Skip to content

Commit 105fe08

Browse files
rugeGerritsenthst-nordic
authored andcommitted
workflows: Add workflow to prevent merging PRs with DNM label
This aligns with other repositories in NCS. Signed-off-by: Rubin Gerritsen <[email protected]>
1 parent e9ef580 commit 105fe08

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

.github/workflows/dnm.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Do Not Merge
2+
3+
on:
4+
pull_request:
5+
types: [synchronize, opened, reopened, labeled, unlabeled]
6+
7+
jobs:
8+
do-not-merge:
9+
if: ${{ contains(github.event.*.labels.*.name, 'DNM') }}
10+
name: Prevent Merging
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Check for label
14+
run: |
15+
echo "Pull request is labeled as 'DNM'"
16+
echo "This workflow fails so that the pull request cannot be merged"
17+
exit 1

0 commit comments

Comments
 (0)