Skip to content
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

Automerge does not work is merge commits are not allowed #4828

Open
paymog opened this issue Aug 9, 2024 · 1 comment
Open

Automerge does not work is merge commits are not allowed #4828

paymog opened this issue Aug 9, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@paymog
Copy link

paymog commented Aug 9, 2024

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request. Searching for pre-existing feature requests helps us consolidate datapoints for identical requirements into a single place, thank you!
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment.

Overview of the Issue

Automerge does not work if merge commits are not allowed.

image

Reproduction Steps

  1. Disable merge commits
  2. Enable automerge
  3. put up pr and plan/apply it
  4. see failure

Logs

atlantis-0 atlantis {"level":"error","ts":"2024-08-09T15:04:25.498Z","caller":"vcs/instrumented_client.go:241","msg":"Unable to merge pull, error: merging pull request: PUT https://api.github.com/repos/goldsky-io/goldsky-infra/pulls/1302/merge: 405 This branch must not contain merge commits. You're not authorized to push to this branch. Visit https://docs.github.com/repositories/configuring-branches-and-merges-in-your-repository/managing-protected-branches/about-protected-branches for more informati []","json":{"repo":"goldsky-io/goldsky-infra","pull":"1302"},"stacktrace":"github.com/runatlantis/atlantis/server/events/vcs.(*InstrumentedClient).MergePull\n\tgithub.com/runatlantis/atlantis/server/events/vcs/instrumented_client.go:241\ngithub.com/runatlantis/atlantis/server/events/vcs.(*ClientProxy).MergePull\n\tgithub.com/runatlantis/atlantis/server/events/vcs/proxy.go:93\ngithub.com/runatlantis/atlantis/server/events.(*AutoMerger).automerge\n\tgithub.com/runatlantis/atlantis/server/events/automerger.go:35\ngithub.com/runatlantis/atlantis/server/events.(*ApplyCommandRunner).Run\n\tgithub.com/runatlantis/atlantis/server/events/apply_command_runner.go:184\ngithub.com/runatlantis/atlantis/server/events.(*DefaultCommandRunner).RunCommentCommand\n\tgithub.com/runatlantis/atlantis/server/events/command_runner.go:367"}
atlantis-0 atlantis {"level":"error","ts":"2024-08-09T15:04:25.498Z","caller":"events/automerger.go:38","msg":"automerging failed: merging pull request: PUT https://api.github.com/repos/goldsky-io/goldsky-infra/pulls/1302/merge: 405 This branch must not contain merge commits. You're not authorized to push to this branch. Visit https://docs.github.com/repositories/configuring-branches-and-merges-in-your-repository/managing-protected-branches/about-protected-branches for more informati []","json":{"repo":"goldsky-io/goldsky-infra","pull":"1302"},"stacktrace":"github.com/runatlantis/atlantis/server/events.(*AutoMerger).automerge\n\tgithub.com/runatlantis/atlantis/server/events/automerger.go:38\ngithub.com/runatlantis/atlantis/server/events.(*ApplyCommandRunner).Run\n\tgithub.com/runatlantis/atlantis/server/events/apply_command_runner.go:184\ngithub.com/runatlantis/atlantis/server/events.(*DefaultCommandRunner).RunCommentCommand\n\tgithub.com/runatlantis/atlantis/server/events/command_runner.go:367"}
@paymog paymog added the bug Something isn't working label Aug 9, 2024
@paymog
Copy link
Author

paymog commented Aug 9, 2024

It would be great if we could have a config option to choose between merge and rebase when merging the PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant