Skip to content

Commit 0ef327a

Browse files
committed
feat(action): check-blocking-label
Signed-off-by: Vincent Koppen <[email protected]>
1 parent a04ff49 commit 0ef327a

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+
6+
name: Check Blocking Labels
7+
8+
on:
9+
# run pipeline on pull request
10+
pull_request:
11+
types:
12+
- opened
13+
- synchronize
14+
- labeled
15+
- unlabeled
16+
# run pipeline on merge queue
17+
merge_group:
18+
# run this workflow manually from the Actions tab
19+
workflow_dispatch:
20+
21+
concurrency:
22+
group: ${{ github.workflow }}-${{ github.ref }}-blocking-labels
23+
cancel-in-progress: true
24+
25+
jobs:
26+
check-blocking-labels:
27+
runs-on: ubuntu-latest
28+
steps:
29+
30+
- name: do-not-merge
31+
if: contains(github.event.pull_request.labels.*.name, 'do-not-merge')
32+
run: |
33+
echo "This pull request should not be merged (do-not-merge)"
34+
exit 1
35+
36+
- name: merge-target-first
37+
if: contains(github.event.pull_request.labels.*.name, 'merge-target-first')
38+
run: |
39+
echo "The target branch of this PR should be merged first (merge-target-first)"
40+
exit 2
41+
42+
- name: needs-unit-tests
43+
if: contains(github.event.pull_request.labels.*.name, 'needs-unit-tests')
44+
run: |
45+
echo "This pull request needs (more) unit tests before it may be merged (needs-unit-tests)"
46+
exit 3

0 commit comments

Comments
 (0)