-
Notifications
You must be signed in to change notification settings - Fork 117
/
Copy pathmergify.yml
131 lines (120 loc) · 3.08 KB
/
mergify.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
pull_request_rules:
- name: Test passed for code changed
conditions:
- or:
- base=master
- base~=^v2(\.\d+).x$
- "status-success=Unittest AMD64 Ubuntu 18.04"
- "status-success=lint"
- "status-success=Run Ci Test (standalone)"
- "status-success=Run Ci Test (cluster)"
actions:
label:
add:
- ci-passed
- name: Test passed for e2e changed
conditions:
- or:
- base=master
- base~=^v2(\.\d+).x$
- -files~=^(?!test\/).+
- "status-success=lint"
- "status-success=Run Ci Test (standalone)"
- "status-success=Run Ci Test (cluster)"
actions:
label:
add:
- ci-passed
- "test\/ci"
- name: Test passed for document changed
conditions:
- base=.+
- -files~=^[^\.]+$
- -files~=\.(?!md|png)
actions:
label:
add:
- ci-passed
- "kind\/documentation"
- name: Test passed for mergify changed
conditions:
- base=master
- -files~=^(?!\.github\/mergify\.yml).*$
actions:
label:
add:
- ci-passed
- name: Test passed for workflow changed
conditions:
- or:
- base=master
- base~=^v2(\.\d+).x$
- -files~=^(?!\.github\/).+
actions:
label:
add:
- ci-passed
- "kind\/workflow"
- name: Test passed for example code changed
conditions:
- or:
- base=master
- base~=^v2(\.\d+).x$
- -files~=^(?!examples\/).+
- "status-success=lint"
actions:
label:
add:
- ci-passed
- name: Remove ci-passed when some test failed
conditions:
- or:
- base=master
- base~=^v2(\.\d+).x$
- or:
- "check-failure=Unittest AMD64 Ubuntu 18.04"
- "check-failure=lint"
actions:
label:
remove:
- ci-passed
- name: Remove ci-passed when some test failed for branch
conditions:
- or:
- base=master
- base~=^v2(\.\d+).x$
- or:
- "check-failure=Unittest AMD64 Ubuntu 18.04"
- "check-failure=lint"
- "check-failure=Run Ci Test (standalone)"
- "check-failure=Run Ci Test (cluster)"
actions:
label:
remove:
- ci-passed
- name: Blocking PR if missing a related issue or PR doesn't have kind/improvement label
conditions:
- base=.+
- -body~=\#[0-9]{1,6}(\s+|$)
- -label=kind/improvement
- -title~=\[automated\]
actions:
label:
add:
- do-not-merge/missing-related-issue
comment:
message: |
@{{author}} Please associate the related issue to the body of your Pull Request. (eg. “issue: #187”)
- name: Dismiss block label if related issue be added into PR
conditions:
- or:
- and:
- base=.+
- body~=\#[0-9]{1,6}(\s+|$)
- and:
- base=.+
- label=kind/improvement
actions:
label:
remove:
- do-not-merge/missing-related-issue