We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e617f34 commit fd6c147Copy full SHA for fd6c147
.github/workflows/block-merge-label.yml
@@ -0,0 +1,20 @@
1
+name: Block Merge if "do-not-merge" Label Exists
2
+
3
+on:
4
+ pull_request:
5
+ types:
6
+ - opened
7
+ - labeled
8
+ - unlabeled
9
+ - synchronize # important for when new commits are pushed
10
11
+jobs:
12
+ check-do-not-merge-label:
13
+ runs-on: ubuntu-latest
14
+ steps:
15
+ - name: Check for "do-not-merge" label
16
+ if: contains(github.event.pull_request.labels.*.name, 'do-not-merge')
17
+ run: |
18
+ echo "This Pull Request has the 'do-not-merge' label. Merging is blocked."
19
+ echo "Please remove the 'do-not-merge' label to enable merging."
20
+ exit 1 # This will cause the workflow to fail
0 commit comments