-
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
fix: allow Require Linear History
when selecting merge method
#3211
fix: allow Require Linear History
when selecting merge method
#3211
Conversation
93e2d02
to
d62d733
Compare
@nitrocode I have fixed the logic a little bit and also added test. |
Please ignore the netlify error and please fix the tester error. |
@nitrocode do you mean |
Yes please ignore the netlify error. Seems to have come from this pr #3225 |
server/events/vcs/testdata/github-branch-protection-require-linear-history.json
Show resolved
Hide resolved
Please fill out the pr template |
@nitrocode I have tested this change on the actual GitHub repository
Atlantis logs: https://gist.github.com/tpolekhin/eb63628798b82e7584d3f2eac14dcd16 |
Require Linear History
when selecting merge method
@tpolekhin great work and testing! Please feel free to propose other PRs if you have the time. And please join the #contributors channel in the atlantis slack community. Thank you! |
@nitrocode thank you for the great feedback and for the merge! |
@tpolekhin this was reverted due to a breaking change. See the related pr #3321 |
* fix: account for Require Linear History when selecting merge method * fix logic and add tests * add nolint hints for w.Write --------- Co-authored-by: nitrocode <[email protected]>
…tlantis#3211) * fix: account for Require Linear History when selecting merge method * fix logic and add tests * add nolint hints for w.Write --------- Co-authored-by: nitrocode <[email protected]>
Reverts "fix(github): branch protection not supported (runatlantis#3276)" Reverts "fix: allow Require Linear History when selecting merge method (runatlantis#3211)" Closes runatlantis#3320
…tlantis#3211) * fix: account for Require Linear History when selecting merge method * fix logic and add tests * add nolint hints for w.Write --------- Co-authored-by: nitrocode <[email protected]>
Reverts "fix(github): branch protection not supported (runatlantis#3276)" Reverts "fix: allow Require Linear History when selecting merge method (runatlantis#3211)" Closes runatlantis#3320
what
Account for branch protection rule "Require Linear History" when choosing merge method
why
When repo config allows merge commits:
But branch protection rules requires linear history (aka banning merge commits):
Current logic will always pick
merge
method by default. This PR fixes that.tests
make test
references