diff --git a/.github/workflows/enforce-do-not-merge-label.yml b/.github/workflows/enforce-do-not-merge-label.yml new file mode 100644 index 0000000000..f0c5e1ecfb --- /dev/null +++ b/.github/workflows/enforce-do-not-merge-label.yml @@ -0,0 +1,18 @@ +name: Check Do Not Merge Label + +on: + pull_request: + types: + - opened + - labeled + - unlabeled + +jobs: + fail-for-do-not-merge: + runs-on: ubuntu-latest + steps: + - name: Fail if PR is labelled with "do not merge" + if: contains(github.event.pull_request.labels.*.name, '🚨 DO NOT MERGE') + run: | + echo "This PR is labelled with "do not merge"." + exit 1