Skip to content

Commit d4bb8ea

Browse files
authored
Merge pull request #4350 from robintown/prevent-blocked
Prevent PRs with the X-Blocked label from being merged
2 parents 99dc3f2 + bbfbdd0 commit d4bb8ea

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

.github/workflows/blocked.yml

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Prevent blocked
2+
on:
3+
pull_request:
4+
types: [opened, labeled, unlabeled]
5+
jobs:
6+
prevent-blocked:
7+
name: Prevent blocked
8+
runs-on: ubuntu-latest
9+
permissions:
10+
pull-requests: read
11+
steps:
12+
- name: Add notice
13+
uses: actions/github-script@v7
14+
if: contains(github.event.pull_request.labels.*.name, 'X-Blocked')
15+
with:
16+
script: |
17+
core.setFailed("PR has been labeled with X-Blocked; it cannot be merged.");

0 commit comments

Comments
 (0)