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 9, 2024
1 parent 1ed8759 commit 9a2ba02
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 9a2ba02

Please sign in to comment.