Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 7333228

Browse filesBrowse files
story645QuLogic
andcommitted
prevent merge on label [skip circle] [skip azp] [skip appveyor]
Co-authored-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
1 parent 3ad0bc5 commit 7333228
Copy full SHA for 7333228

File tree

Expand file treeCollapse file tree

1 file changed

+30
-0
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+30
-0
lines changed

‎.github/workflows/do_not_merge.yml

Copy file name to clipboard
+30Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
---
2+
name: Do Not Merge
3+
4+
# action to block merging on specific labels
5+
on:
6+
pull_request:
7+
types: [synchronize, opened, reopened, labeled, unlabeled]
8+
9+
permissions: {}
10+
11+
jobs:
12+
do-not-merge:
13+
name: Prevent Merging
14+
runs-on: ubuntu-latest
15+
env:
16+
has_tag: >-
17+
${{contains(github.event.pull_request.labels.*.name, 'status: needs comment/discussion') ||
18+
contains(github.event.pull_request.labels.*.name, 'status: waiting for other PR')}}
19+
steps:
20+
- name: Check for label
21+
if: ${{'true' == env.has_tag}}
22+
run: |
23+
echo "This PR cannot be merged because it has one of the following labels: "
24+
echo "* status: needs comment/discussion"
25+
echo "* status: waiting for other PR"
26+
echo "${{env.has_tag}}"
27+
exit 1
28+
- name: Allow merging
29+
if: ${{'false' == env.has_tag}}
30+
run: exit 0

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.