File tree Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change 2
2
#
3
3
# SPDX-License-Identifier: MPL-2.0
4
4
5
- name : Check Blocking Labels
5
+ name : Check PR Labels
6
6
7
7
on :
8
8
# run pipeline on pull request
18
18
workflow_dispatch :
19
19
20
20
concurrency :
21
- group : ${{ github.workflow }}-${{ github.ref }}-blocking -labels
21
+ group : ${{ github.workflow }}-${{ github.ref }}-pr -labels
22
22
cancel-in-progress : true
23
23
24
24
jobs :
25
- check-blocking -labels :
25
+ check-pr -labels :
26
26
runs-on : ubuntu-latest
27
27
steps :
28
-
28
+
29
+ - name : fail-if-no-label
30
+ if : github.event_name == 'pull_request'
31
+ run : |
32
+ if [ "$(jq '.pull_request.labels | length' "$GITHUB_EVENT_PATH")" -eq 0 ]; then
33
+ echo "This pull request has no labels. Please add at least one label."
34
+ exit 1
35
+ fi
36
+
29
37
- name : do-not-merge
30
38
if : contains(github.event.pull_request.labels.*.name, 'do-not-merge')
31
39
run : |
You can’t perform that action at this time.
0 commit comments