Skip to content

Commit

Permalink
feat: Creat waiting-to-merge action
Browse files Browse the repository at this point in the history
Prevents merging when a `waiting to merge` label is applied
  • Loading branch information
trillium committed Sep 7, 2023
1 parent 49d8136 commit 7539283
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/waiting-to-merge.yaml
Original file line number Diff line number Diff line change
@@ -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.*.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

0 comments on commit 7539283

Please sign in to comment.