forked from xline-kv/Xline
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.mergify.yml
110 lines (104 loc) · 3.1 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
pull_request_rules:
- name: Automatic merge on approval
conditions:
- -draft
- check-success = "Tests Normal"
- check-success = "Tests Madsim"
- check-success = "Commit Message Validation"
- check-success = "Spell Check"
- check-success = "Build"
- check-success = "E2E kube (v1.27.3)"
- check-success = "E2E kube (v1.28.7)"
- check-success = "E2E kube (v1.29.2)"
- check-success = "Validation"
- check-success = "DCO"
- check-success = "codecov/project"
- check-success = "codecov/patch"
- or:
- "#approved-reviews-by >= 2"
- and:
- author = dependabot[bot]
- "#approved-reviews-by >= 1"
actions:
merge:
method: rebase
- name: convert to draft
conditions:
- base = master
- -draft
- -label = "CI:fail"
- or:
- check-failure = "Tests Normal"
- check-failure = "Tests Madsim"
- check-failure = "Validation"
- check-failure = "Build"
- check-failure = "E2E kube (v1.27.3)"
- check-failure = "E2E kube (v1.28.7)"
- check-failure = "E2E kube (v1.29.2)"
actions:
comment:
message: "@{{author}} Convert your pr to draft since CI failed"
edit:
draft: true
label:
add:
- "CI:fail"
- name: convert to ready-to-review
conditions:
- base = master
- label = "CI:fail"
- draft
- check-success = "Tests Normal"
- check-success = "Tests Madsim"
- check-success = "Build"
- check-success = "E2E kube (v1.27.3)"
- check-success = "E2E kube (v1.28.7)"
- check-success = "E2E kube (v1.29.2)"
- check-success = "Validation"
actions:
edit:
draft: false
label:
remove:
- "CI:fail"
- name: automatic approval for Dependabot pull requests
conditions:
- -draft
- author = dependabot[bot]
- check-success = "Tests Normal"
- check-success = "Tests Madsim"
- check-success = "Commit Message Validation"
- check-success = "Spell Check"
- check-success = "Build"
- check-success = "E2E kube (v1.27.3)"
- check-success = "E2E kube (v1.28.7)"
- check-success = "E2E kube (v1.29.2)"
- check-success = "Validation"
- check-success = "DCO"
actions:
review:
type: APPROVE
message: Automatically approving dependabot
- name: balanced review assignment
conditions:
- -draft
- author != dependabot[bot]
actions:
request_reviews:
teams:
- "@XlineTeam"
random_count: 2
- name: comment when a pull request cannot be merged
conditions:
- -draft
- conflict
actions:
comment:
message: "@{{author}} Your PR is in conflict and cannot be merged."
- name: comment when modify workflow
conditions:
- author != dependabot[bot]
- files ~= ^\.github/workflows/
actions:
comment:
message: "@{{author}} You've modified the workflows. Please don't forget to update the .mergify.yml."