15
15
# limitations under the License.
16
16
17
17
# Mergify follow our workflow: https://os.mbed.com/docs/mbed-os/latest/contributing/workflow.html
18
+ # Inital state is done by internal reviewer bot
19
+
20
+ # Notes: conditions do not check if label is already there if we add or remote, this is to limit Github API access to
21
+ # minimum. If a label is already there and we add it again, nothing bad happens (we gain 1 less access).
22
+ # For instance for needs: work if CI failed, we just add a label as action.
18
23
19
24
pull_request_rules :
25
+ # From review to needs: work - reviewers request
20
26
- name : " label needs: work when changes were requested"
21
27
conditions :
22
- # Labels
23
- - " label!=needs: work"
24
- - " label!=needs: preceding PR"
25
-
26
28
# Reviewers
27
29
- " #changes-requested-reviews-by>0"
28
30
actions :
@@ -32,12 +34,9 @@ pull_request_rules:
32
34
remove :
33
35
- " needs: review"
34
36
37
+ # From review to needs: work - CI failure
35
38
- name : " label needs: work when travis-ci failed"
36
39
conditions :
37
- # Labels
38
- - " label!=needs: work"
39
- - " label!=needs: preceding PR"
40
-
41
40
# Travis failing
42
41
- status-failure~=continuous-integration/travis-ci/pr
43
42
actions :
@@ -47,6 +46,7 @@ pull_request_rules:
47
46
remove :
48
47
- " needs: review"
49
48
49
+ # From review to needs: work - CI failure
50
50
- name : " label needs: work when Jenkins CI failed - pr head"
51
51
conditions :
52
52
# Jenkins CI failing
@@ -55,7 +55,10 @@ pull_request_rules:
55
55
label :
56
56
add :
57
57
- " needs: work"
58
+ remove :
59
+ - " needs: review"
58
60
61
+ # From review to needs: work - CI failure
59
62
- name : " label needs: work when Jenkins CI failed - any of the pipeline"
60
63
conditions :
61
64
# Jenkins CI failing - any of the pipeline
@@ -64,6 +67,8 @@ pull_request_rules:
64
67
label :
65
68
add :
66
69
- " needs: work"
70
+ remove :
71
+ - " needs: review"
67
72
68
73
- name : " label needs: CI when at least one reviewers approval"
69
74
conditions :
@@ -127,9 +132,6 @@ pull_request_rules:
127
132
conditions :
128
133
# Labels
129
134
- label!=do not merge
130
- - " label!=needs: work"
131
- - " label!=needs: preceding PR"
132
- - " label!=needs: review"
133
135
- " label=needs: CI"
134
136
135
137
# Reviewers
0 commit comments