CI: Do not allow merge if labelled DO-NOT-MERGE#103337
Merged
Uh oh!
There was an error while loading. Please reload this page.
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.
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