Skip to content

Commit 7ae18cd

Browse files
authored
Merge branch 'next' into patch-1
2 parents 294f81b + da423b6 commit 7ae18cd

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)