Skip to content

Commit 1a1580b

Browse files
authored
Add workflow to check that PR has label(s) (#186)
1 parent 42161b7 commit 1a1580b

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

.github/workflows/labels.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: Force pull-requests label(s)
2+
3+
on:
4+
pull_request:
5+
types: [opened, labeled, unlabeled]
6+
jobs:
7+
pr-has-label:
8+
name: Will be skipped if labelled
9+
runs-on: ubuntu-latest
10+
if: ${{ join(github.event.pull_request.labels.*.name, ', ') == '' }}
11+
steps:
12+
- run: |
13+
echo 'Pull-request must have at least one label'
14+
exit 1

0 commit comments

Comments
 (0)