Skip to content

Commit 6432b03

Browse files
committed
add blocking labels check
Signed-off-by: Martijn Govers <[email protected]>
1 parent 520586e commit 6432b03

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# SPDX-FileCopyrightText: Contributors to the Power Grid Model project <[email protected]>
2+
#
3+
# SPDX-License-Identifier: MPL-2.0
4+
5+
name: Check Blocking Labels
6+
7+
on:
8+
# run pipeline on pull request
9+
pull_request:
10+
types:
11+
- opened
12+
- synchronize
13+
- labeled
14+
- unlabeled
15+
# run pipeline on merge queue
16+
merge_group:
17+
# run this workflow manually from the Actions tab
18+
workflow_dispatch:
19+
20+
concurrency:
21+
group: ${{ github.workflow }}-${{ github.ref }}-blocking-labels
22+
cancel-in-progress: true
23+
24+
jobs:
25+
check-blocking-labels:
26+
runs-on: ubuntu-latest
27+
steps:
28+
29+
- name: do-not-merge
30+
if: contains(github.event.pull_request.labels.*.name, 'do-not-merge')
31+
run: |
32+
echo "This pull request should not be merged (do-not-merge)"
33+
exit 1
34+
35+
- name: merge-target-first
36+
if: contains(github.event.pull_request.labels.*.name, 'merge-target-first')
37+
run: |
38+
echo "The target branch of this PR should be merged first (merge-target-first)"
39+
exit 2
40+
41+
- name: needs-unit-tests
42+
if: contains(github.event.pull_request.labels.*.name, 'needs-unit-tests')
43+
run: |
44+
echo "This pull request needs (more) unit tests before it may be merged (needs-unit-tests)"
45+
exit 3
46+

0 commit comments

Comments
 (0)