2022-09-27 13:34:53 -07:00
|
|
|
# Automatic merging of approved PRs for Zebra
|
|
|
|
#
|
|
|
|
# This file can be edited and validated using:
|
|
|
|
# https://dashboard.mergify.com/github/ZcashFoundation/repo/zebra/config-editor
|
|
|
|
|
2022-01-07 16:11:01 -08:00
|
|
|
queue_rules:
|
2022-09-27 13:34:53 -07:00
|
|
|
- name: urgent
|
2022-06-01 11:40:56 -07:00
|
|
|
# Allow to update/rebase the original pull request if possible to check its mergeability,
|
|
|
|
# and it does not create a draft PR if not needed
|
|
|
|
allow_inplace_checks: True
|
2022-02-18 14:53:27 -08:00
|
|
|
allow_checks_interruption: False
|
2022-04-13 17:17:16 -07:00
|
|
|
speculative_checks: 1
|
2022-08-24 15:23:44 -07:00
|
|
|
batch_size: 8
|
2022-04-14 00:15:57 -07:00
|
|
|
# Wait a short time to embark hotfixes together in a merge train
|
|
|
|
batch_max_wait_time: "2 minutes"
|
2022-04-12 17:28:03 -07:00
|
|
|
conditions:
|
|
|
|
# Mergify automatically applies status check, approval, and conversation rules,
|
|
|
|
# which are the same as the GitHub main branch protection rules
|
|
|
|
# https://docs.mergify.com/conditions/#about-branch-protection
|
|
|
|
- base=main
|
2022-01-07 16:11:01 -08:00
|
|
|
|
2022-09-27 13:34:53 -07:00
|
|
|
- name: batched
|
2022-06-01 11:40:56 -07:00
|
|
|
allow_inplace_checks: True
|
2022-04-13 17:17:16 -07:00
|
|
|
allow_checks_interruption: True
|
|
|
|
speculative_checks: 1
|
2022-08-24 15:23:44 -07:00
|
|
|
batch_size: 20
|
2022-09-27 13:34:53 -07:00
|
|
|
# Wait for about 10% of the time it takes Rust PRs to run CI (3h)
|
2022-08-24 15:23:44 -07:00
|
|
|
batch_max_wait_time: "20 minutes"
|
2022-04-12 17:28:03 -07:00
|
|
|
conditions:
|
|
|
|
- base=main
|
2022-01-07 16:11:01 -08:00
|
|
|
|
2023-07-10 16:34:15 -07:00
|
|
|
# These rules are checked in order, the first one to be satisfied applies
|
2022-01-07 16:11:01 -08:00
|
|
|
pull_request_rules:
|
2023-07-10 16:34:15 -07:00
|
|
|
- name: move to urgent queue when CI passes with multiple reviews
|
2022-01-07 16:11:01 -08:00
|
|
|
conditions:
|
2023-07-10 16:34:15 -07:00
|
|
|
# This queue handles a PR if it:
|
|
|
|
# has multiple approving reviewers
|
|
|
|
- "#approved-reviews-by>=2"
|
|
|
|
# is labeled with Critical priority
|
|
|
|
- 'label~=^P-Critical'
|
|
|
|
# and satisfies the standard merge conditions:
|
|
|
|
# targets main
|
2022-01-07 16:11:01 -08:00
|
|
|
- base=main
|
2023-07-10 16:34:15 -07:00
|
|
|
# is not in draft
|
2022-04-12 17:28:03 -07:00
|
|
|
- -draft
|
2023-07-10 16:34:15 -07:00
|
|
|
# does not include the do-not-merge label
|
2022-04-12 17:28:03 -07:00
|
|
|
- label!=do-not-merge
|
2023-07-10 16:34:15 -07:00
|
|
|
actions:
|
|
|
|
queue:
|
|
|
|
name: urgent
|
|
|
|
method: squash
|
|
|
|
|
|
|
|
- name: move to urgent queue when CI passes with 1 review
|
|
|
|
conditions:
|
|
|
|
# This queue handles a PR if it:
|
|
|
|
# has at least one approving reviewer (branch protection rule)
|
|
|
|
# does not need extra reviews
|
|
|
|
- 'label!=extra-reviews'
|
|
|
|
# is labeled with Critical priority
|
2022-04-13 17:17:16 -07:00
|
|
|
- 'label~=^P-Critical'
|
2023-07-10 16:34:15 -07:00
|
|
|
# and satisfies the standard merge conditions:
|
|
|
|
- base=main
|
|
|
|
- -draft
|
|
|
|
- label!=do-not-merge
|
2022-01-07 16:11:01 -08:00
|
|
|
actions:
|
|
|
|
queue:
|
2022-09-27 13:34:53 -07:00
|
|
|
name: urgent
|
2022-01-13 15:34:09 -08:00
|
|
|
method: squash
|
2022-01-07 16:11:01 -08:00
|
|
|
|
2023-07-10 16:34:15 -07:00
|
|
|
- name: move to batched queue when CI passes with multiple reviews
|
|
|
|
conditions:
|
|
|
|
# This queue handles a PR if it:
|
|
|
|
# has multiple approving reviewers
|
|
|
|
- "#approved-reviews-by>=2"
|
|
|
|
# is labeled with any other priority (rules are checked in order)
|
|
|
|
# and satisfies the standard merge conditions:
|
|
|
|
- base=main
|
|
|
|
- -draft
|
|
|
|
- label!=do-not-merge
|
|
|
|
actions:
|
|
|
|
queue:
|
|
|
|
name: batched
|
|
|
|
method: squash
|
|
|
|
|
|
|
|
- name: move to batched queue when CI passes with 1 review
|
2022-01-07 16:11:01 -08:00
|
|
|
conditions:
|
2023-07-10 16:34:15 -07:00
|
|
|
# This queue handles a PR if it:
|
|
|
|
# has at least one approving reviewer (branch protection rule)
|
|
|
|
# does not need extra reviews
|
|
|
|
- 'label!=extra-reviews'
|
|
|
|
# is labeled with any other priority (rules are checked in order)
|
|
|
|
# and satisfies the standard merge conditions:
|
2022-01-07 16:11:01 -08:00
|
|
|
- base=main
|
2022-04-12 17:28:03 -07:00
|
|
|
- -draft
|
2022-01-07 16:11:01 -08:00
|
|
|
- label!=do-not-merge
|
|
|
|
actions:
|
|
|
|
queue:
|
2022-09-27 13:34:53 -07:00
|
|
|
name: batched
|
2022-08-24 15:23:44 -07:00
|
|
|
method: squash
|