From e5280afad9e0e552df6f28c26b8445defa2119a6 Mon Sep 17 00:00:00 2001 From: Saif Chaudhry Date: Wed, 4 Mar 2026 10:38:57 -0800 Subject: [PATCH] ci: add workflow to block merging PRs with do-not-merge label Adds a GitHub Actions check that fails when the `do-not-merge` label is present on a PR. Requires adding this as a required status check in branch protection rules to actually prevent merging. Note: partially generated by AI Signed-off-by: Saif Chaudhry --- .github/workflows/do-not-merge.yaml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 .github/workflows/do-not-merge.yaml diff --git a/.github/workflows/do-not-merge.yaml b/.github/workflows/do-not-merge.yaml new file mode 100644 index 0000000000000..c2b02d9282485 --- /dev/null +++ b/.github/workflows/do-not-merge.yaml @@ -0,0 +1,18 @@ +name: "Do Not Merge" + +on: + pull_request: + types: [opened, labeled, unlabeled, synchronize] + +jobs: + do-not-merge: + runs-on: ubuntu-latest + steps: + - name: Block merge if do-not-merge label is present + env: + LABELS: ${{ toJson(github.event.pull_request.labels.*.name) }} + run: | + if echo "$LABELS" | grep -q 'do-not-merge'; then + echo "::error::PR has the 'do-not-merge' label. Remove it before merging." + exit 1 + fi