19
19
20
20
# Notes: conditions do not check if label is already there if we add or remove later, this is to limit Github API access to
21
21
# minimum. If a label is already there and we add it again, nothing should happen (we do 1 less access to Github).
22
- # For instance for needs: work if CI failed, we just add a label as action, don't check if needs: works is already there
22
+ # For instance for needs: work if CI failed, we just add a label as action, don't check if needs: works is already there.
23
+ #
24
+ # Reviewers request needs write access to block PR, otherwise it's just a suggestion on Github, not PR block
23
25
24
26
pull_request_rules :
25
27
# From needs: review to needs: work - reviewers request
@@ -74,12 +76,11 @@ pull_request_rules:
74
76
remove :
75
77
- " needs: review"
76
78
77
- # From needs: review to needs: CI
79
+ # From needs: review or needs: work to needs: CI. One approval means we should be good to start CI
78
80
- name : " label needs: CI when at least one reviewers approval"
79
81
conditions :
80
82
- base~=feature-mergify
81
83
# Labels
82
- - " label!=needs: work"
83
84
- " label!=needs: preceding PR"
84
85
85
86
# Reviewers
@@ -88,14 +89,16 @@ pull_request_rules:
88
89
89
90
# CI green policy, at least Travis should be green
90
91
- status-success~=continuous-integration/travis-ci/pr
91
- # new CI needs to be done
92
- - status-neutral~=continuous-integration/jenkins/pr-head
92
+ # new CI needs to be done (neutral does not work, lets check if it failed or passed, if none, we need to run again)
93
+ - -status-success~=continuous-integration/jenkins/pr-head
94
+ - -status-failure~=continuous-integration/jenkins/pr-head
93
95
actions :
94
96
label :
95
97
add :
96
98
- " needs: CI"
97
99
remove :
98
100
- " needs: review"
101
+ - " needs: work"
99
102
100
103
# Conflict in the PR - needs: work and a comment to notify a user
101
104
- name : " label needs: work when there is a conflict"
@@ -126,7 +129,7 @@ pull_request_rules:
126
129
conditions :
127
130
- base~=feature-mergify
128
131
# Labels
129
- - label!=do not merge
132
+ - " label!=do not merge"
130
133
- " label=needs: CI"
131
134
132
135
# Reviewers
@@ -137,12 +140,12 @@ pull_request_rules:
137
140
- status-success~=continuous-integration/travis-ci/pr
138
141
# Internal Jenkins - we rely on PR head to provide status
139
142
- status-success~=continuous-integration/jenkins/pr-head
140
- # any of the jenkins pipeline needs to be green
141
- - status-success ~=^jenkins-ci
143
+ # any of the jenkins pipeline needs to be green. We rely on not failure means all good (if skipped or executed)
144
+ - - status-failure ~=^jenkins-ci
142
145
actions :
143
146
label :
144
147
add :
145
- - ready for merge
148
+ - " ready for merge"
146
149
remove :
147
150
- " needs: CI"
148
151
@@ -151,11 +154,11 @@ pull_request_rules:
151
154
conditions :
152
155
- base~=feature-mergify
153
156
- merged
154
- - label=ready for merge
157
+ - " label=ready for merge"
155
158
actions :
156
159
label :
157
160
remove :
158
- - ready for merge
161
+ - " ready for merge"
159
162
160
163
- name : add "do not merge" label when WIP is in title
161
164
conditions :
@@ -164,7 +167,7 @@ pull_request_rules:
164
167
actions :
165
168
label :
166
169
add :
167
- - do not merge
170
+ - " do not merge"
168
171
169
172
# Check if version label is applied
170
173
- name : release version is a must for merged PRs
@@ -175,7 +178,7 @@ pull_request_rules:
175
178
actions :
176
179
label :
177
180
add :
178
- - Release review required
181
+ - " Release review required"
179
182
comment :
180
183
message : This PR does not contain release version label after merging.
181
184
0 commit comments