Use GitHub's automerge instead of Mergify #9126
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We first set up Mergify in 2020 to automerge PRs once certain conditions were met: CI has passed, PR is approved,
automerge
label added: #4931.Since then, GitHub has added native automerge which is a bit nicer to use: no need to add a label, and while the CI is still running, the "Merge pull request" button becomes an "Enable auto-merge" button, which will do the merge when the CI passes.
Docs: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/incorporating-changes-from-a-pull-request/automatically-merging-a-pull-request
I've created a ruleset for the
main
branch at 🔒 https://github.com/python-pillow/Pillow/settings/rules/7135275. There are lots of settings, but I've mirrored the Mergify ones:Require these status checks to pass:
Also left this enabled, because we don't want to accidentally delete
main
:We don't need to add a label, because it's now signalled by clicking "Enable auto-merge".
And we don't require explicit approval, because that's also implicit when clicking "Enable auto-merge" (similarly, for a PR where the CI has already passed, we don't require explicit approvals).
If for some reason a status check fails but we still want to merge (maybe some dependency is temporarily failing to download because a server is down), as admins we can still click to bypass the rules and merge.
Screenshots of all the settings