Skip to content

Commit

Permalink
workflows: Add workflow to prevent merging PRs with DNM label
Browse files Browse the repository at this point in the history
This aligns with other repositories in NCS.

Signed-off-by: Rubin Gerritsen <[email protected]>
  • Loading branch information
rugeGerritsen authored and thst-nordic committed Nov 27, 2024
1 parent e9ef580 commit 105fe08
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/dnm.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, 'DNM') }}
name: Prevent Merging
runs-on: ubuntu-latest
steps:
- name: Check for label
run: |
echo "Pull request is labeled as 'DNM'"
echo "This workflow fails so that the pull request cannot be merged"
exit 1

0 comments on commit 105fe08

Please sign in to comment.