Skip to content

Commit 43a8c90

Browse files
authored
Merge pull request ARMmbed#12292 from ARMmbed/feature-mergify
Multiple labels need to be in an array of strings
2 parents 80fe861 + fecd1c2 commit 43a8c90

File tree

1 file changed

+19
-42
lines changed

1 file changed

+19
-42
lines changed

.mergify.yml

Lines changed: 19 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,8 @@ pull_request_rules:
3131
- "#changes-requested-reviews-by>0"
3232
actions:
3333
label:
34-
add:
35-
- "needs: work"
36-
remove:
37-
- "needs: review"
38-
- "needs: CI"
34+
add: ['needs: work']
35+
remove: ['needs: review', 'needs: CI']
3936

4037
# From needs: review to needs: work - CI failure
4138
- name: "label needs: work when travis-ci failed"
@@ -44,11 +41,8 @@ pull_request_rules:
4441
- status-failure~=continuous-integration/travis-ci/pr
4542
actions:
4643
label:
47-
add:
48-
- "needs: work"
49-
remove:
50-
- "needs: review"
51-
- "needs: CI"
44+
add: ['needs: work']
45+
remove: ['needs: review', 'needs: CI']
5246

5347
# From needs: review to needs: work - CI failure
5448
- name: "label needs: work when Jenkins CI failed - pr head"
@@ -57,11 +51,8 @@ pull_request_rules:
5751
- status-failure~=continuous-integration/jenkins/pr-head
5852
actions:
5953
label:
60-
add:
61-
- "needs: work"
62-
remove:
63-
- "needs: review"
64-
- "needs: CI"
54+
add: ['needs: work']
55+
remove: ['needs: review','needs: CI']
6556

6657
# From needs: review to needs: work - CI failure
6758
- name: "label needs: work when Jenkins CI failed - any of the pipeline"
@@ -70,11 +61,8 @@ pull_request_rules:
7061
- status-failure~=^jenkins-ci
7162
actions:
7263
label:
73-
add:
74-
- "needs: work"
75-
remove:
76-
- "needs: review"
77-
- "needs: CI"
64+
add: ['needs: work']
65+
remove: ['needs: review', 'needs: CI']
7866

7967
# From needs: review or needs: work to needs: CI. One approval means we should be good to start CI
8068
- name: "label needs: CI when at least one reviewers approval"
@@ -93,11 +81,8 @@ pull_request_rules:
9381
- -status-failure~=continuous-integration/jenkins/pr-head
9482
actions:
9583
label:
96-
add:
97-
- "needs: CI"
98-
remove:
99-
- "needs: review"
100-
- "needs: work"
84+
add: ['needs: CI']
85+
remove: ['needs: review', 'needs: work']
10186

10287
# Remove reviews after the branch is updated. This yet does not allow
10388
# any other action like labels, etc. See mergify-engine/issues/360
@@ -114,11 +99,9 @@ pull_request_rules:
11499
- conflict
115100
actions:
116101
label:
117-
add:
118-
- "needs: work"
119-
remove:
120-
- "needs: review"
121-
- "needs: CI"
102+
add: ['needs: work']
103+
remove: ['needs: review', 'needs: CI']
104+
122105
comment:
123106
message: This PR cannot be merged due to conflicts. Please rebase to resolve them.
124107

@@ -127,8 +110,7 @@ pull_request_rules:
127110
- base~=^feature
128111
actions:
129112
label:
130-
add:
131-
- "release-version: feature branch"
113+
add: ['release-version: feature branch']
132114

133115
# Ready for integration. Not yet auto merge, will be enabled once carefuly tested
134116
- name: label "ready for merge" when ready
@@ -149,10 +131,8 @@ pull_request_rules:
149131
- -status-failure~=^jenkins-ci
150132
actions:
151133
label:
152-
add:
153-
- "ready for merge"
154-
remove:
155-
- "needs: CI"
134+
add: ['ready for merge']
135+
remove: ['needs: CI']
156136

157137
# Clean-up after merge
158138
- name: remove ready for merge when merged
@@ -161,16 +141,14 @@ pull_request_rules:
161141
- "label=ready for merge"
162142
actions:
163143
label:
164-
remove:
165-
- "ready for merge"
144+
remove: ['ready for merge']
166145

167146
- name: add "do not merge" label when WIP is in title
168147
conditions:
169148
- title~=^(\[wip\]( |:) |\[WIP\]( |:) |wip( |:) |WIP( |:)).*
170149
actions:
171150
label:
172-
add:
173-
- "do not merge"
151+
add: ['do not merge']
174152

175153
# Check if version label is applied
176154
- name: release version is a must for merged PRs
@@ -179,8 +157,7 @@ pull_request_rules:
179157
- -label~=^(release-version)
180158
actions:
181159
label:
182-
add:
183-
- "Release review required"
160+
add: ['Release review required']
184161
comment:
185162
message: This PR does not contain release version label after merging.
186163

0 commit comments

Comments
 (0)