-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement an automerge feature. #389
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -82,6 +82,7 @@ module.exports = { | |
'locking', | ||
'autoplanning', | ||
'checkout-strategy', | ||
'automerging', | ||
'security' | ||
] | ||
} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Automerging | ||
Atlantis can be configured to automatically merge a PR after all plans have | ||
been successfully applied. Automerging can be enabled either by passing the | ||
`--automerge` flag to the `atlantis server` command, or it can be specified | ||
using `atlantis.yaml` at the top level: | ||
|
||
```yaml | ||
version: 2 | ||
automerge: true | ||
projects: | ||
- dir: project1 | ||
autoplan: | ||
when_modified: ["../modules/**/*.tf", "*.tf*"] | ||
``` | ||
|
||
The automerge setting is global, and if specified on the command line it will | ||
override any `atlantis.yaml` settings. You may need to adjust the permissions | ||
for your git provider to enable merging via the API. | ||
|
||
When automerge is enabled, the changes will only be merged if all plan and | ||
apply stages have succeeded. |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't the service account used to post comments etc. require write permissions for this to work?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The account would indeed require write permissions. Is there something in the doc which contradicts that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nothing that contradicts it, but it doesn't mention that requirement explicitly anywhere :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's required for Atlantis to work correctly (I think?), so I don't see why it would be explicitly called out in this section of the doc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See here: https://www.runatlantis.io/docs/deployment.html#create-an-access-token-for-atlantis
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, cool. Nvm then 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It actually does require increased permissions depending on your setup. For example, my user token can comment on public pull requests but it can't merge unless I'm a collaborator.
The token needs to be from a user with those permissions.