Skip to content

Commit

Permalink
Merge pull request #7944 from jrjohnson/prevent-do-not-merge
Browse files Browse the repository at this point in the history
Prevent Merging Do Not Merge PRs
  • Loading branch information
stopfstedt committed Jul 15, 2024
2 parents 772e179 + 3e47c93 commit dc944b5
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 dc944b5

Please sign in to comment.