Merge pull request #10371 from geekosaur/sdist-whoopsie
[cabal.git] / .github / mergify.yml
blob46eae2f7a803a7442631411a90b33b21e71c1b81
1 # Note: We do not use the rebase strategy to merge PRs, because that
2 # loses information needed by changelog-d to associate commits with PRs.
4 priority_rules:
6   - name: high priority
7     conditions:
8       - 'label=priority: high :fire:'
9     priority: high
11   # The idea is we slightly prioritize those PRs because we're in
12   # a release cycle if a PR matches.
13   - name: release branch
14     conditions:
15       - 'base~=^3\.'
16       - 'label!=backport'
17     # 'normal' is 2000, 'high' is 3000
18     priority: 2500
20 pull_request_rules:
22   # implementing PR delay logic: apply a label after 2 days of inactivity
23   # the label will allow Mergify to merge (see #8442, #8448)
24   - actions:
25       label:
26         add:
27           - merge delay passed
28     name: Wait for 2 days before validating merge
29     conditions:
30       - or:
31         - 'label=priority: high :fire:'
32         - updated-at<2 days ago
33       - or:
34         - label=merge me
35         - label=squash+merge me
36         - label=merge+no rebase
37       - '#approved-reviews-by>=2'
39   # label when Mergify is ready but waiting for the above
40   - actions:
41       label:
42         add:
43           - ready and waiting
44     name: Waiting out merge delay (used by bot)
45     conditions:
46       - base=master
47       - -draft
48       - -closed
49       - or:
50         - label=merge me
51         - label=squash+merge me
52         - label=merge+no rebase
53       - '#approved-reviews-by>=2'
54       - '#changes-requested-reviews-by=0'
55       # oy
56       # lifted these from branch protection imports
57       - check-success=fourmolu
58       - check-success=hlint
59       - check-success=Meta checks
60       - check-success=Doctest Cabal
61       - check-success=Validate post job
62       - check-success=Bootstrap post job
63       - 'check-success=docs/readthedocs.org:cabal'
65   # rebase+merge strategy
66   - actions:
67       queue:
68         name: default
69     name: Put pull requests in the rebase+merge queue
70     conditions:
71       - base=master
72       - label=merge me
73       - label=merge delay passed
74       - '#approved-reviews-by>=2'
75       - '-label~=^blocked:'
77   # merge+squash strategy
78   - actions:
79       queue:
80         name: squash-merge
81     name: Put pull requests in the squash+merge queue
82     conditions:
83       - base=master
84       - label=squash+merge me
85       - label=merge delay passed
86       - '#approved-reviews-by>=2'
87       - '-label~=^blocked:'
89   # merge+no rebase strategy
90   - actions:
91       merge:
92         method: merge
93     name: Merge "merge+no rebase" pull requests directly (without a queue)
94     conditions:
95       - base=master
96       - label=merge+no rebase
97       - label=merge delay passed
98       - '#approved-reviews-by>=2'
99       - '-label~=^blocked:'
101   # merge strategy for release branches
102   - actions:
103       queue:
104         name: default
105     name: Put release branch pull requests in the rebase+merge queue
106     conditions:
107       - label=merge me
108       - base!=master
109       - -body~=backport
110       - '#approved-reviews-by>=2'
111       - '-label~=^blocked:'
113   # merge+squash strategy for release branches
114   - actions:
115       queue:
116         name: squash-merge
117     name: Put release branch pull requests in the squash+merge queue
118     conditions:
119       - base!=master
120       - label=squash+merge me
121       - -body~=backport
122       - '#approved-reviews-by>=2'
123       - '-label~=^blocked:'
125   # merge strategy for backports: require 1 approver instead of 2
126   - actions:
127       queue:
128         name: default
129     name: Put backports in the rebase+merge queue
130     conditions:
131       - label=merge me
132       - base!=master
133       - body~=backport
134       - '#approved-reviews-by>=1'
135       - '-label~=^blocked:'
137   # merge+squash strategy for backports: require 1 approver instead of 2
138   - actions:
139       queue:
140         name: squash-merge
141     name: Put backports in the squash+merge queue
142     conditions:
143       - label=squash+merge me
144       - base!=master
145       - body~=backport
146       - '#approved-reviews-by>=1'
147       - '-label~=^blocked:'
149   # backports should be labeled as such
150   - actions:
151       label:
152         add:
153           - backport
154     name: Label backports as such
155     conditions:
156       - body~=automatic backport
158 queue_rules:
159   # Mergify now requires different queues for different strategies
160   - name: default
161     update_bot_account: Mikolaj
162     merge_method: merge
163     update_method: rebase
165   - name: squash-merge
166     update_bot_account: Mikolaj
167     merge_method: squash
168     update_method: merge