From 7ffd4e0f829dbacecbf5ce87a89f899206cb8df4 Mon Sep 17 00:00:00 2001 From: Trillium Smith Date: Wed, 6 Sep 2023 23:40:31 -0700 Subject: [PATCH] feat: Creat waiting-to-merge action Prevents merging when a `waiting to merge` label is applied --- .github/workflows/waiting-to-merge.yaml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 .github/workflows/waiting-to-merge.yaml diff --git a/.github/workflows/waiting-to-merge.yaml b/.github/workflows/waiting-to-merge.yaml new file mode 100644 index 000000000..9b41dc9ac --- /dev/null +++ b/.github/workflows/waiting-to-merge.yaml @@ -0,0 +1,17 @@ +name: Waiting to Merge + +on: + pull_request: + types: [synchronize, opened, reopened, labeled, unlabeled] + +jobs: + do-not-merge: + if: ${{ contains(github.event.*.labels.*.name, 'waiting to merge') }} + name: Prevent Merging + runs-on: ubuntu-latest + steps: + - name: Check for label + run: | + echo "Pull request is labeled as 'waiting to merge'" + echo "This workflow fails so that the pull request cannot be merged" + exit 1