Skip to content

Commit fa527ba

Browse files
Merge pull request #191 from cybozu-go/test-support-do-not-merge-label
test: support do-not-merge label
2 parents 7e25f99 + 4356ed9 commit fa527ba

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Check Do Not Merge Label
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize, reopened, labeled, unlabeled]
6+
7+
jobs:
8+
check-label:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Check for do-not-merge label
12+
run: |
13+
if [[ "${{ contains(github.event.pull_request.labels.*.name, 'do-not-merge') }}" == "true" ]]; then
14+
echo "::error::This PR has the 'do-not-merge' label and cannot be merged"
15+
exit 1
16+
fi
17+
echo "No blocking labels found"

0 commit comments

Comments
 (0)