From 4356ed9adaa7e3f357cbdc0013c88b246ead5a2d Mon Sep 17 00:00:00 2001 From: Satoru Takeuchi Date: Wed, 19 Nov 2025 00:10:12 +0000 Subject: [PATCH] test: support do-not-merge label Support do-not-merge label for PR. PR can't be merged if this label is set. The use cases of this label are to prohibit PRs that are needs to be rebased or squashed. Signed-off-by: Satoru Takeuchi --- .github/workflows/check-do-not-merge.yaml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 .github/workflows/check-do-not-merge.yaml diff --git a/.github/workflows/check-do-not-merge.yaml b/.github/workflows/check-do-not-merge.yaml new file mode 100644 index 00000000..68216406 --- /dev/null +++ b/.github/workflows/check-do-not-merge.yaml @@ -0,0 +1,17 @@ +name: Check Do Not Merge Label + +on: + pull_request: + types: [opened, synchronize, reopened, labeled, unlabeled] + +jobs: + check-label: + runs-on: ubuntu-latest + steps: + - name: Check for do-not-merge label + run: | + if [[ "${{ contains(github.event.pull_request.labels.*.name, 'do-not-merge') }}" == "true" ]]; then + echo "::error::This PR has the 'do-not-merge' label and cannot be merged" + exit 1 + fi + echo "No blocking labels found"