Skip to content

Commit

Permalink
Prevent Merging Do Not Merge PRs
Browse files Browse the repository at this point in the history
Just some added safety.
  • Loading branch information
jrjohnson committed Jul 15, 2024
1 parent 794afa5 commit 3e47c93
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/fail-do-not-merge.yml
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.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

0 comments on commit 3e47c93

Please sign in to comment.