Skip to content

feat: goal and topic phases accept the full task phase set and name it in errors #469

feat: goal and topic phases accept the full task phase set and name it in errors

feat: goal and topic phases accept the full task phase set and name it in errors #469

name: check-do-not-merge
on:
pull_request:
types: [opened, reopened, synchronize, labeled, unlabeled, ready_for_review]
jobs:
do-not-merge:
runs-on: ubuntu-latest
steps:
- name: Check for do-not-merge label
env:
PR_LABELS: ${{ toJson(github.event.pull_request.labels) }}
run: |
# Parse with jq, not grep. toJson pretty-prints the payload as
# `"name": "do-not-merge"` (space after the colon), so the previous
# pattern '"name":"do-not-merge"' never matched and this gate passed
# with the label applied — a required check that always reported green.
if echo "$PR_LABELS" | jq -e 'any(.[]; .name == "do-not-merge")' >/dev/null; then
echo "::error::Merge blocked by the do-not-merge label"
exit 1
fi
echo "No do-not-merge label — merge allowed"