Skip to content

Commit

Permalink
Workflow to implement a "do not merge" label.
Browse files Browse the repository at this point in the history
  • Loading branch information
rspier committed May 12, 2024
1 parent 62734c1 commit 9722015
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/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.*.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 9722015

Please sign in to comment.