go-ceph/.github/mergify.yml
John Mulligan 7a542b786a 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>
2021-08-23 10:14:21 -04:00

50 lines
1.4 KiB
YAML

---
pull_request_rules:
- name: remove outdated approvals
conditions:
- base=master
actions:
dismiss_reviews:
approved: true
changes_requested: false
- name: automatic merge
conditions:
- label!=do-not-merge
- label!=extended-review
- base=master
- "#changes-requested-reviews-by=0"
- status-success=check
- status-success=dpulls
# each test should be listed separately, do not use regular expressions:
# https://docs.mergify.io/conditions.html#validating-all-status-check
- 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
rebase_fallback: merge
strict: smart
strict_method: rebase
dismiss_reviews: {}
delete_head_branch: {}
- name: ask to resolve conflict
conditions:
- conflict
actions:
comment:
message: "This pull request now has conflicts with the target branch.
Could you please resolve conflicts and force push the corrected
changes? 🙏"