-
Notifications
You must be signed in to change notification settings - Fork 16
Add support for automatic PR merging and branch updates #66
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
Conversation
This adds support for the `auto_merge` setting in GitHub repositories. If `auto_merge` is `true` users can enable auto-merging of selected pull requests: those requests will be merged as soon as the PR has the required number of reviews and all required status checks passed. See [GitHub documentation](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/incorporating-changes-from-a-pull-request/automatically-merging-a-pull-request) for more details.
|
When looking how the options are organized in the UI: you see that options related to PRs are grouped slightly differently. So we have the merge method (what we call enabled_merge_buttons) and then some other settings wrt auto merging, update and auto_merge. Imho, we should have a pull_requests feature, that bundles all these options together, other than that the PR looks great. Something that I would add as this easily leads to confusion is a link to the documentation of the auto merge feature: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/incorporating-changes-from-a-pull-request/automatically-merging-a-pull-request One thing that is very important: auto merge does only make sense if you have a branch protection rule with at least 1 status check as the button will only be visible if the PR can not be merged right away. The idea of this feature is that you normally have to wait some time till the checks complete and only then can you click the merge button. So you can already say: merge this PR if all checks pass. |
What about backward compatibility? If I modify the schema to accept: github:
pull_requests:
enabled_merge_buttons:
squash: truethe old configuration will not work. |
|
sorry I was not clear, I am not asking you to change that right away but I was wondering how to best organize these options. Adding the |
|
So your are suggesting to have |
|
tbh I am not sure right now. There exists So when we would start from scratch I would add a |
|
@Humbedooh, any ideas? |
|
what about adding a
the Edit: and at one point in the future when we feel motivated we can also migrate the existing |
|
Sounds good to me! |
|
updated the PR with the outlined refactoring. The legacy setting so imho, this looks clean, wdyt @Humbedooh |
|
I removed the documentation of the initially proposed |
|
LGTM, nice work. |

This adds support for the
auto_mergesetting in GitHub repositories.If
auto_mergeistrueusers can enable auto-merging of selected pull requests: those requests will be merged as soon as the PR has the required number of reviews and all required status checks passed.See GitHub documentation for more details.