Skip to content

Commit 4428315

Browse files
authored
Prevent PRs with the X-Blocked label from being merged (#130)
Adapted from matrix-js-sdk (https://github.com/matrix-org/matrix-js-sdk/blob/develop/.github/workflows/pull_request.yaml)
1 parent 5d81d4a commit 4428315

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

.github/workflows/blocked.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Prevent blocked
2+
on:
3+
pull_request_target:
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)