From 3e47c935de7a7adda5d67f489f651f96e209882d Mon Sep 17 00:00:00 2001 From: Jonathan Johnson Date: Tue, 9 Jul 2024 13:58:54 -0700 Subject: [PATCH] Prevent Merging Do Not Merge PRs Just some added safety. --- .github/workflows/fail-do-not-merge.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 .github/workflows/fail-do-not-merge.yml diff --git a/.github/workflows/fail-do-not-merge.yml b/.github/workflows/fail-do-not-merge.yml new file mode 100644 index 0000000000..54349fe903 --- /dev/null +++ b/.github/workflows/fail-do-not-merge.yml @@ -0,0 +1,17 @@ +name: Do Not Merge + +on: + pull_request: + types: [synchronize, opened, reopened, labeled, unlabeled] + +jobs: + do-not-merge: + if: contains(github.event.pull_request.labels.*.name, 'DO NOT MERGE') + name: Prevent Merging + runs-on: ubuntu-latest + steps: + - name: Check for label + run: | + echo "Pull request is labeled as 'DO NOT MERGE'" + echo "This workflow fails so that the pull request cannot be merged" + exit 1