Commit Graph

78 Commits

Author SHA1 Message Date
Rui Chen
6f7f8f2c5c test: update tests per command package refactoring (#2317) 2022-06-13 17:16:13 -04:00
Quan Hoang
3744535dac Further parse Gitlab MergeRequest Update events (#1301) 2022-06-09 20:42:58 -07:00
Sarvar Muminov
90e92e3a13 chore: move CommandContext and CommandResult to models (#193) (#2093)
* Moved CommandContext and CommandResult to models (#193)

* Moved CommandContext and CommandResult to models

* move from models to command

rename CommandContext -> Context
rename CommandResult -> Result

* moved command related helpers into command package

* move ProjectCommandContext and ProjectResult to command/project package

* move project command context and project result

* revert unrelated code

* move tests

* fix left over

* fix linting

* fix tests

* remove unused import

* fix project context dependencies

* fix depenedecies

* fix typo
2022-03-21 10:36:13 -07:00
Maxime Brunet
24e8cf7a79 fix(bitbucketcloud)!: Use AccountID as username instead of Nickname (#2034)
* fix(bitbucketcloud)!: Use AccountID as username instead of Nickname

* Update PullRequest.Author as well

* Remove unused Nickname field
2022-03-07 11:57:10 -05:00
Daniel Grimes
4248e2ebf4 fix(azure): allow correct path to be derived for on premise installation (#1863)
* add .devcontainer to .gitignore

* allow AzureDevOps host to be specified in the user_config

* fix spacing issues

* gofmt

* fixes to cmd and update to approach

* add specific self host fixtures

* add specific self host parser tests

* update code to azure self hosted devops

* go fmt

Co-authored-by: atlantisbot <lkysow+atlantis@gmail.com>
2021-10-26 10:34:47 -07:00
Eng Zer Jun
38cf7b0141 refactor: move from io/ioutil to io and os package (#1843)
The io/ioutil package has been deprecated as of Go 1.16, see
https://golang.org/doc/go1.16#ioutil. This commit replaces the existing
io/ioutil functions with their new definitions in io and os packages.

Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2021-10-07 00:37:42 -04:00
Spiros Economakis
e48f80359b Add an extra flag to disable automerge with comment apply (#1533)
```
atlantis apply --auto-merge-disabled
```

Issue: #1245
2021-06-22 09:33:07 -07:00
Luke Kysow
f787100b6a Fix bug responding to draft pr updates
Previously any update to a draft PR other than "closed" would default to
being an "open" event due to a bug in the parsing logic.
2020-09-22 09:49:41 -07:00
rob
227ce9cbf4 Upgrade to github/v31 for CompleteAppManifest
split fixtures out elsewhere, add working dir test
2020-06-03 20:18:13 -04:00
CJ Ketchum
d7ce63742e Add test for plan-draft behavior 2020-05-25 16:45:38 -07:00
Andrew Ring
3c87af9996 Release locks when closing draft PRs
If plan is run manually in a draft PR, the PR may hold locks. If
the draft PR is then closed, without first marking it Ready For
Review, the locks are left in place. To resolve this, we can
process closing draft PRs in the same way as non-draft PRs.
2020-05-13 10:35:22 -07:00
Christopher Ketchum
9ce981fc6c Ignore Github draft PRs (#977)
* Ignore Github draft PRs
2020-04-20 21:04:19 -07:00
David McPike
09eb6ac18e Fixes #835
- Improve tests
    - Replace instead of Split
2019-11-14 17:57:58 -06:00
David McPike
71239cf943 Fixes #835
AzureDevops: Support slashes in branch names
2019-11-14 00:23:44 -06:00
Luke Kysow
07ffe179e7 Small refactoring to azure devops support 2019-10-25 18:07:18 -07:00
David McPike
9424893e1f Complete migration to PR comment event
- Update docs
- Remove work item commented event code
2019-10-05 00:17:42 -05:00
David McPike
9714c87dda Azure Devops event parser updates
- Extract owner and project from workitem.commented payload
- Process all Relations and return last error
2019-09-24 09:41:59 -05:00
David McPike
495cf76efd Azure Devops update
- Remove org and project configs
- Add support for WriteGitCreds
2019-09-23 08:24:59 -05:00
David McPike
bb88c95dff Improves Azure Devops webhook error handling 2019-09-22 16:09:04 -05:00
David McPike
e04005a682 Fix duplicate go-gitlab references 2019-08-30 13:09:50 -05:00
David McPike
c346cce484 Merge remote-tracking branch 'upstream/master' into azure-devops 2019-08-30 12:48:47 -05:00
Luke Kysow
b81fe9a5e5 Switch to gomod 2019-08-26 18:38:22 +02:00
Luke Kysow
3919f05548 Update to latest version of go-gitlab 2019-08-26 18:23:52 +02:00
David McPike
83d0b04532 Remove Project member from models Repo struct 2019-07-28 10:45:48 -05:00
David McPike
acef89adc4 Azure Devops PR minor cleanup, fix tests, checks
- Re-write tests for azuredevops_client
- CircleCI checks should pass
- NewAzureDevopsClient() now takes a hostname like NewGithubClient()
- Docs include comment about default merge strategy requirements
2019-07-28 10:37:45 -05:00
David McPike
f8d9e30a8e Update Azure Devops tests and get them to pass 2019-07-16 21:55:56 -05:00
David McPike
eeaab9f6d7 Merge tag 'v0.8.3' into azure-devops 2019-07-12 23:27:43 -05:00
Luke Kysow
a2349b64d7 Fix bug parsing BB Cloud pull rejected events
Was using the word DECLINE but the actual keyword is DECLINED.
2019-06-13 14:47:29 +01:00
David McPike
dd9041f131 Merge remote-tracking branch 'upstream/master' into azure-devops 2019-05-17 09:31:44 -05:00
Luke Kysow
d0308a52e7 Redact clone url during clone errors.
If there was an error during cloning, we would sometimes print the clone
credentials to the pull request and in the Atlantis logs. This change
ensures we print the redacted clone url.

We also change the redacted clone url to contain "username:<redacted>"
so that if users see the redacted url in logs, they'll know we were
using a credentialed form and so if they try to replicate with curl
they'll know to substitute the correct credentials.
2019-05-07 09:14:59 -04:00
David McPike
5cbcf25de0 Initial support for azure devops events
- Pull request events
- Work item comment events
2019-04-27 17:52:08 -05:00
David McPike
03bfefe9f4 continue azure devops support 2019-04-03 23:52:48 -05:00
Luke Kysow
8982a67b78 Run latest goimports 2019-03-30 20:22:49 -05:00
Luke Kysow
d78b106cab Refactor @jjulien's server-side config work. 2019-03-27 14:47:48 -05:00
John Julien
1fcdaba719 Added new --repo-config option and deprecated --allow-repo-config
This enables atlantis.yaml in all repos, but by default restricts
certain sensitive keys from being used.

The keys apply_requirements, workflow, and workflows can only be
specified in an atlantis.yaml file if explicitly allowed by a
server side repo config.

The repo config file provides the ability to specify a default set of
workflows, and default values for apply_requirements and workflow to use
use on a per repo basis.  It also supports applying to a collection of
repos by using regex to match a repo name.

If more than one repo name matches, the values from last repo matched
are used.

This deprecates the --allow-repo-config option
2019-03-27 14:47:48 -05:00
Luke Kysow
2fb8f4d4ff Support bitbucket server pr:deleted event
If a pull request is deleted, Atlantis should delete the locks.
Fixes #498
2019-03-01 11:36:22 -05:00
Luke Kysow
5f4a94b0af Move CommandName to models package 2019-02-26 12:03:25 -05:00
Luke Kysow
d2abdb569a Provide base branch name in pull request model
This is needed in order to support the ability to check out the repo as
it would appear after the pull request is merged into the base branch.
2019-01-15 13:45:35 -05:00
Luke Kysow
3c1e1ab6e3 Update gitlab lib. Fix breakages. 2018-12-12 12:41:33 -06:00
Luke Kysow
e9b7001266 Add godocs. Refactor ProjectResult. Golint errors. 2018-08-30 16:47:17 -06:00
Luke Kysow
5fb3ac115e Support GitLab subgroups.
GitLab allows repos to be nested under multiple subgroups,
for example owner/group/subgroup/subsubgroup/repo vs. owner/repo. This
change enables that functionality.
2018-08-23 10:24:54 -10:00
Luke Kysow
5ee990cec1 Don't default dir and workspace.
Lay groundwork for atlantis plan/apply to work on everything.
2018-08-08 17:08:08 -10:00
Luke Kysow
6940bfa57e Rename enum 2018-08-02 20:26:05 -07:00
Luke Kysow
da236e953b Test Bitbucket Server 2018-07-24 20:34:01 +02:00
Luke Kysow
a4c48f5d47 Add provisional Bitbucket Server support 2018-07-24 20:23:51 +02:00
Luke Kysow
718619c045 Rename Bitbucket to BitbucketCloud 2018-07-24 20:23:51 +02:00
Luke Kysow
506b817acd Add bitbucket json events. Docs. 2018-07-21 21:30:10 +02:00
Luke Kysow
3d5ef7adbf Code cleanup 2018-07-20 20:02:14 +02:00
Luke Kysow
ea08e7f2a1 Fix gometalint check 2018-07-20 14:37:42 +02:00
Luke Kysow
e2930e48e5 Test bitbucket parsing 2018-07-20 13:27:25 +02:00