-
-
Notifications
You must be signed in to change notification settings - Fork 30.3k
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
CI: Do not allow merge if labelled DO-NOT-MERGE #103337
Conversation
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.
Looks good!
Require PR label
seems like an odd name for this workflow, though.
Maybe it can be more generic like Check PR labels
?
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.
Great idea overall; I'd been wanting to add something like this for a while now. We should probably backport this at least to 3.11, since automerge functionality is particularly common on auto-backport PRs.
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
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.
LGTM 👍
Shout out to @mheap for developing this useful GH action 👋
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.
LGTM now, thanks @hugovk !
Thanks @hugovk for the PR 🌮🎉.. I'm working now to backport this PR to: 3.11. |
GH-103393 is a backport of this pull request to the 3.11 branch. |
(cherry picked from commit 090e26e) Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com> Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
(cherry picked from commit 090e26e) Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com> Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
GH-103641 is a backport of this pull request to the 3.10 branch. |
For python/core-workflow#498.
Before switching to GitHub's own auto-merge, we need to make sure it respects the DO-NOT-MERGE label.
We can use https://github.com/mheap/github-action-required-labels to prevent merge if a label exists. We will set this new check as required, and it only passes when DO-NOT-MERGE is absent.
Docs: https://github.com/mheap/github-action-required-labels#prevent-merging-if-a-label-exists
This will also disable the merge button for PRs with DO-NOT-MERGE , regardless of using GitHub auto-merge, which will also help avoid accidental merges.
TODO
name:
Demo
In my fork, I've set the check to required and created a demo PR: hugovk#47
No label: can merge
With label: cannot merge