-
Notifications
You must be signed in to change notification settings - Fork 7
/
.mergify.yml
107 lines (100 loc) · 2.82 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
shared:
author-bot: &author_bot
- or:
- author=rb-org-bot[bot]
- author=dependabot[bot]
- author=renovate[bot]
author-rbusarow: &author_rbusarow
- author=RBusarow
base-main: &base_main
- base=main
label-approved: &label_approved
- label=approved
label-automerge: &label_automerge
- label=automerge
label-dnm: &label_dnm
- label=do-not-merge
not-label-dnm: ¬_label_dnm
- label!=do-not-merge
label-rebase: &label_rebase
- label=rebase
name-approved: &name_approved approved
name-automerge: &name_automerge automerge
name-rb-org-bot: &name_rb_org_bot rb-org-bot[bot]
name-merge-bot: &name_merge_bot rbusarow-bot
name-rebase: &name_rebase rebase
success-ci: &success_ci
- check-success=all-checks
pull_request_rules:
- name: Queue PRs for rebase-merge when CI passes and approved
# GitHub branch protection rules are also applied automatically
conditions:
- and: *label_automerge
- and: *base_main
- and: *not_label_dnm
actions:
queue:
# maybe change to 'rebase' if this causes problems
merge_method: fast-forward
update_method: rebase # this is also the default when 'merge_method' is 'fast-forward'
autosquash: true
merge_bot_account: *name_merge_bot
update_bot_account: *name_merge_bot
- name: Remove automerge label once merged
conditions:
- merged
- and: *label_automerge
actions:
label:
remove:
- *name_automerge
- name: Auto-approve RBusarow PRs
conditions:
- and: *success_ci
- and: *author_rbusarow
actions:
review:
type: APPROVE
message: Automatically approving RBusarow pull request
- name: Auto-approve bot PRs
conditions:
- and: *success_ci
- or: *author_bot
actions:
review:
type: APPROVE
message: Automatically approving bot pull request
- name: Auto-approve any PR with an 'approved' label
conditions:
- and: *success_ci
- and: *label_approved
actions:
rebase:
autosquash: true
bot_account: *name_merge_bot
label:
remove:
- *name_approved
- name: Rebase any PR with a 'rebase' label
conditions:
- and: *label_rebase
actions:
rebase:
autosquash: true
bot_account: *name_merge_bot
label:
remove:
- *name_rebase
- name: Re-queue any PR with a 'requeue' label
conditions:
- label=requeue
actions:
queue:
# maybe change to 'rebase' if this causes problems
merge_method: fast-forward
update_method: rebase # this is also the default when 'merge_method' is 'fast-forward'
autosquash: true
merge_bot_account: *name_merge_bot
label:
remove:
- requeue