Skip to content

Commit a7d62d6

Browse files
authored
Merge pull request #71 from stackhpc/check_dismiss
Add safeguards for running CI on vouched PRs
2 parents 2b1b7ee + d834175 commit a7d62d6

2 files changed

Lines changed: 36 additions & 3 deletions

File tree

zuul.d/pipelines.yaml

Lines changed: 33 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,33 @@
22
name: check
33
description: |
44
Newly uploaded patchsets enter this pipeline to receive an
5-
initial check status.
5+
initial check status. For PRs from Developers (write access),
6+
runs automatically. For external PRs, requires the ok-to-test
7+
label to be added by a member of the stackhpc/Developers GitHub group.
68
manager: independent
9+
require:
10+
github:
11+
open: True
12+
current-patchset: True
713
trigger:
814
github:
9-
# Run this pipeline on new/changed pull requests
15+
# Run automatically for write-access users (stackhpc/Developers)
1016
- event: pull_request
1117
action:
1218
- opened
1319
- changed
1420
- reopened
15-
# Run in response to a pull request comment "recheck"
21+
permission: write
22+
# Run when a Developers member adds ok-to-test label to an external PR
23+
- event: pull_request
24+
action: labeled
25+
label:
26+
- ok-to-test
27+
# Run in response to a pull request comment "recheck" by write-access users
1628
- event: pull_request
1729
action: comment
1830
comment: (?i)^\s*recheck(\s.*)?$
31+
permission: write
1932
# When using the checks API to report results, failed runs
2033
# will have a "re-run" button which emits this event.
2134
- event: check_run
@@ -53,6 +66,23 @@
5366
check: cancelled
5467
comment: false
5568

69+
- pipeline:
70+
name: check-dismiss
71+
description: |
72+
Silently removes the ok-to-test label when new commits are pushed to a
73+
pull request, requiring a Developers member to re-approve before CI runs.
74+
manager: independent
75+
trigger:
76+
github:
77+
- event: pull_request
78+
action:
79+
- changed
80+
- reopened
81+
start:
82+
github:
83+
unlabel: ok-to-test
84+
comment: false
85+
5686
- pipeline:
5787
name: check-review
5888
description: |

zuul.d/projects.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
name: ^.*$
33
check:
44
jobs: []
5+
check-dismiss:
6+
jobs:
7+
- noop
58
gate:
69
jobs: []
710

0 commit comments

Comments
 (0)