Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .github/workflows/block-PR-with-no-merge-label.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# .github/workflows/block-no-merge-label.yml
name: Block PRs with "NO-MERGE" label

on:
pull_request:
types: [labeled, unlabeled, synchronize, opened, reopened]

jobs:
check-label:
runs-on: ubuntu-latest
steps:
- name: Check for "NO-MERGE" label
uses: actions/github-script@v7
with:
script: |
const labels = context.payload.pull_request.labels.map(label => label.name);
if (labels.includes("NO-MERGE")) {
core.setFailed("This pull request has a NO-MERGE label and cannot be merged.");
}