-
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
feat(automerge): implement GitHub --auto-merge-method flag for apply command #4895
Conversation
@a1k0u Thanks for implementing this feature. Looks like there is some conflict before merging the PR. |
aeabb57
to
43e0a7a
Compare
@chenrui333 |
43e0a7a
to
20cbcc6
Compare
@chenrui333, hi! Can you review this PR again, please? |
20cbcc6
to
22788e2
Compare
2d2aebe
to
138d163
Compare
@chenrui333 @jamengual @X-Guardian, hi! Can you review this PR again, please? |
022e7eb
to
2fded7d
Compare
@chenrui333 @jamengual @X-Guardian @GenPage @lukemassa, hi! Any updates? |
@a1k0u, could you please sign the commit? sorry we have not gotten to your pr, but we have been more busy than normal |
683404c
to
63dfbea
Compare
@jamengual, thank you! I've signed off the commit |
63dfbea
to
c4564b7
Compare
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.
I think this option should be called automerge-method
rather than merge-method
to be clear that it is the method to be used for an auto-merge and not a normal merge.
4b02fb3
to
cf87803
Compare
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.
Thanks @a1k0u. I've tested this on GitHub and it is working as expected, and on GitLab it is showing the correct error message.
Just some minor refinement to the error messages and we are good to go.
Signed-off-by: a1k0u <alko7enko@gmail.com>
Signed-off-by: a1k0u <alko7enko@gmail.com>
….mod (main) (runatlantis#4968) Signed-off-by: X-Guardian <simonheather99@gmail.com> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: X-Guardian <simonheather99@gmail.com> Signed-off-by: a1k0u <alko7enko@gmail.com>
Co-authored-by: Simon Heather <32168619+X-Guardian@users.noreply.github.com> Signed-off-by: Alexey Kosenko <alko7enko@gmail.com> Signed-off-by: a1k0u <alko7enko@gmail.com>
Signed-off-by: a1k0u <alko7enko@gmail.com>
e30e203
to
63d8e7e
Compare
@X-Guardian, thx! It looks great :) |
Thanks for your work on this @a1k0u. You can test it by using one of the following container images: dev-alpine-13fa635 or dev-debian-13fa635 |
…command (runatlantis#4895) Signed-off-by: a1k0u <alko7enko@gmail.com> Signed-off-by: X-Guardian <simonheather99@gmail.com>
…command (runatlantis#4895) Signed-off-by: a1k0u <alko7enko@gmail.com> Signed-off-by: X-Guardian <simonheather99@gmail.com>
…command (runatlantis#4895) Signed-off-by: a1k0u <alko7enko@gmail.com> Signed-off-by: X-Guardian <simonheather99@gmail.com>
what
Implemented flag which allows to specify merge method for the VCS (GitHub only for now) in automerge process.
why
In our company, Atlantis is used not only by DevOps/SRE/Ops engineers, but also by many developers from other teams. They have a different style of git commit messages, a different way of dividing code changes into commits. Sometimes we need to ask them to squash commits/rewrite the commit message.
This causes problems - after first review, the developers force changes (squash commits/rewrite the commit message), and then start the second
atlantis plan
, which must be reviewed a second time. Squash fixes this because the result commit message is a PR header that can be changed without any changes to the git history.In the old logic, all methods except squash can be disabled, and this will fix the previous case, but maintenance engineers often work with a large task where a single pull request contains several independent commits that can be revert after merging into master.
Thus, these two cases conflict with each other, because we need to use different merge strategies in different situations.
This can be fixed if any flag is able to control the merge method for automerge function.
tests
I have tested my changes by extend
TestGithubClient_MergePullCorrectMethod
. Added tests in which the--auto-merge-method
flag has the correct value, where correct value is not allowed and where value is not correct.make test
references
(opened issue) Automerge support for "require linear history" #1176
(opened issue) Feature Request: Allow Auto Merge with Squash or Rebase option #2047