Merge pull request #10313 from 9999years/gitignore-testdb
[cabal.git] / .github / mergify.yml
blob485d34d50d00965d9411b99bff79bd9e503f86be
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 pull_request_rules:
6   # implementing PR delay logic: apply a label after 2 days of inactivity
7   # the label will allow Mergify to merge (see #8442, #8448)
8   - actions:
9       label:
10         add:
11           - merge delay passed
12     name: Wait for 2 days before validating merge
13     conditions:
14       - updated-at<2 days ago
15       - or:
16         - label=merge me
17         - label=squash+merge me
18         - label=merge+no rebase
19       - '#approved-reviews-by>=2'
21   # label when Mergify is ready but waiting for the above
22   - actions:
23       label:
24         add:
25           - ready and waiting
26     name: Waiting out merge delay (used by bot)
27     conditions:
28       - base=master
29       - -draft
30       - -closed
31       - or:
32         - label=merge me
33         - label=squash+merge me
34         - label=merge+no rebase
35       - '#approved-reviews-by>=2'
36       - '#changes-requested-reviews-by=0'
37       # oy
38       # lifted these from branch protection imports
39       - check-success=fourmolu
40       - check-success=hlint
41       - check-success=Meta checks
42       - check-success=Doctest Cabal
43       - check-success=Validate post job
44       - check-success=Bootstrap post job
45       - 'check-success=docs/readthedocs.org:cabal'
47   # rebase+merge strategy
48   - actions:
49       queue:
50         name: default
51     name: Put pull requests in the rebase+merge queue
52     conditions:
53       - base=master
54       - label=merge me
55       - label=merge delay passed
56       - '#approved-reviews-by>=2'
57       - '-label~=^blocked:'
59   # merge+squash strategy
60   - actions:
61       queue:
62         name: squash-merge
63     name: Put pull requests in the squash+merge queue
64     conditions:
65       - base=master
66       - label=squash+merge me
67       - label=merge delay passed
68       - '#approved-reviews-by>=2'
69       - '-label~=^blocked:'
71   # merge+no rebase strategy
72   - actions:
73       merge:
74         method: merge
75     name: Merge "merge+no rebase" pull requests directly (without a queue)
76     conditions:
77       - base=master
78       - label=merge+no rebase
79       - label=merge delay passed
80       - '#approved-reviews-by>=2'
81       - '-label~=^blocked:'
83   # merge strategy for release branches
84   - actions:
85       queue:
86         name: default
87     name: Put release branch pull requests in the rebase+merge queue
88     conditions:
89       - label=merge me
90       - base!=master
91       - -body~=backport
92       - '#approved-reviews-by>=2'
93       - '-label~=^blocked:'
95   # merge+squash strategy for release branches
96   - actions:
97       queue:
98         name: squash-merge
99     name: Put release branch pull requests in the squash+merge queue
100     conditions:
101       - base!=master
102       - label=squash+merge me
103       - -body~=backport
104       - '#approved-reviews-by>=2'
105       - '-label~=^blocked:'
107   # merge strategy for backports: require 1 approver instead of 2
108   - actions:
109       queue:
110         name: default
111     name: Put backports in the rebase+merge queue
112     conditions:
113       - label=merge me
114       - base!=master
115       - body~=backport
116       - '#approved-reviews-by>=1'
117       - '-label~=^blocked:'
119   # merge+squash strategy for backports: require 1 approver instead of 2
120   - actions:
121       queue:
122         name: squash-merge
123     name: Put backports in the squash+merge queue
124     conditions:
125       - label=squash+merge me
126       - base!=master
127       - body~=backport
128       - '#approved-reviews-by>=1'
129       - '-label~=^blocked:'
131   # backports should be labeled as such
132   - actions:
133       label:
134         add:
135           - backport
136     name: Label backports as such
137     conditions:
138       - body~=automatic backport
140 queue_rules:
141   # Mergify now requires different queues for different strategies
142   - name: default
143     update_bot_account: Mikolaj
144     merge_method: merge
145     update_method: rebase
147   - name: squash-merge
148     update_bot_account: Mikolaj
149     merge_method: squash
150     update_method: merge