github: update mergify rules to handle API vs non-API PRs

This implements the policy first outlined in
https://github.com/ceph/go-ceph/discussions/549

In short: if a PR includes API changes (has the API label) then
either 2 reviews are required or 1 review plus 10 days must pass;
if a PR includes no API changes, then only 1 review is needed.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
This commit is contained in:
John Mulligan 2021-08-19 10:17:29 -04:00 committed by John Mulligan
parent a32355cba2
commit 7a542b786a

12
.github/mergify.yml vendored
View File

@ -12,7 +12,6 @@ pull_request_rules:
- label!=do-not-merge
- label!=extended-review
- base=master
- "#approved-reviews-by>=2"
- "#changes-requested-reviews-by=0"
- status-success=check
- status-success=dpulls
@ -21,6 +20,17 @@ pull_request_rules:
- status-success=test-suite (nautilus)
- status-success=test-suite (octopus)
- status-success=test-suite (pacific)
- or:
- and:
- label!=API
- "#approved-reviews-by>=1"
- and:
- label=API
- "#approved-reviews-by>=2"
- and:
- label=API
- "#approved-reviews-by>=1"
- "updated-at<10 days ago"
actions:
merge:
method: rebase