diff --git a/.github/workflows/check-dnm-label.yml b/.github/workflows/check-dnm-label.yml new file mode 100644 index 0000000000..545a8c732b --- /dev/null +++ b/.github/workflows/check-dnm-label.yml @@ -0,0 +1,23 @@ +--- +name: Check for DNM labels + +on: + pull_request: + types: + - opened + - reopened + - synchronize + - edited + - labeled + - unlabeled + +jobs: + check-for-DNM: + runs-on: ubuntu-latest + steps: + + - name: Fail if PR is DNM + if: contains(github.event.pull_request.labels.*.name, 'do-not-merge/hold') || contains(github.event.pull_request.labels.*.name, 'do-not-merge/work-in-progress') + run: | + echo "This PR has a DNM label." + exit 1