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 33# SPDX-License-Identifier: MPL-2.0
44
55
6- name : Check Blocking Labels
6+ name : Check PR Labels
77
88on :
99 # run pipeline on pull request
1919 workflow_dispatch :
2020
2121concurrency :
22- group : ${{ github.workflow }}-${{ github.ref }}-blocking -labels
22+ group : ${{ github.workflow }}-${{ github.ref }}-pr -labels
2323 cancel-in-progress : true
2424
2525jobs :
26- check-blocking -labels :
26+ check-pr -labels :
2727 runs-on : ubuntu-latest
2828 steps :
29-
29+
30+ - name : fail-if-no-label
31+ if : github.event_name == 'pull_request'
32+ run : |
33+ if [ "$(jq '.pull_request.labels | length' "$GITHUB_EVENT_PATH")" -eq 0 ]; then
34+ echo "This pull request has no labels. Please add at least one label."
35+ exit 1
36+ fi
37+
3038 - name : do-not-merge
3139 if : contains(github.event.pull_request.labels.*.name, 'do-not-merge')
3240 run : |
You can’t perform that action at this time.
0 commit comments