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.
2 parents 294f81b + da423b6 commit 7ae18cdCopy full SHA for 7ae18cd
.github/workflows/check-mergable-by-label.yml
@@ -0,0 +1,31 @@
1
+name: PR Labels
2
+
3
+on:
4
+ pull_request:
5
+ types:
6
+ - opened
7
+ - reopened
8
+ - synchronize
9
+ - edited
10
+ - labeled
11
+ - unlabeled
12
13
+permissions: {}
14
15
+jobs:
16
+ fail-by-blocking-label:
17
+ runs-on: ubuntu-latest
18
+ steps:
19
+ - name: Check for blocking labels
20
+ run: |
21
+ BLOCKING_LABELS=("do NOT merge yet" "s: on hold")
22
+ PR_LABELS=$(jq -r '.pull_request.labels[].name' "$GITHUB_EVENT_PATH")
23
24
+ for LABEL in "${BLOCKING_LABELS[@]}"; do
25
+ if [[ "$PR_LABELS" == *"$LABEL"* ]]; then
26
+ echo "This PR has a blocking label: $LABEL"
27
+ exit 1
28
+ fi
29
+ done
30
31
+ echo "No blocking labels found"
0 commit comments