70 lines
2.1 KiB
YAML
70 lines
2.1 KiB
YAML
# 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
|
|
|
|
# Set the maximum number of PRs that can be checked in parallel in a queue
|
|
merge_queue:
|
|
max_parallel_checks: 5
|
|
|
|
# Provides a means to set configuration values that act as fallbacks
|
|
# for queue_rules and pull_request_rules
|
|
defaults:
|
|
# Define our default queue rules
|
|
queue_rule:
|
|
# 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
|
|
# Wait for about 10% of the time it takes Rust PRs to run CI (~1h)
|
|
batch_max_wait_time: "10 minutes"
|
|
queue_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
|
|
# is not in draft
|
|
- -draft
|
|
# does not include the do-not-merge label
|
|
- label!=do-not-merge
|
|
# has at least one approving reviewer
|
|
- "#approved-reviews-by >= 1"
|
|
|
|
|
|
# Allows to define the rules that reign over our merge queues
|
|
queue_rules:
|
|
- name: urgent
|
|
batch_size: 5
|
|
# Wait a short time to embark hotfixes together in a merge train
|
|
batch_max_wait_time: "2 minutes"
|
|
queue_conditions:
|
|
# is labeled with Critical priority
|
|
- 'label~=^P-Critical'
|
|
|
|
- name: batched
|
|
batch_size: 20
|
|
|
|
pull_request_rules:
|
|
- name: move to any queue if GitHub Rulesets are satisfied
|
|
conditions: []
|
|
actions:
|
|
queue:
|
|
|
|
# Rules that will determine which priority a pull request has when entering
|
|
# our merge queue
|
|
#
|
|
# These rules are checked in order, the first one to be satisfied applies
|
|
priority_rules:
|
|
- name: urgent
|
|
conditions:
|
|
# is labeled with Critical priority
|
|
- 'label~=^P-Critical'
|
|
allow_checks_interruption: true
|
|
priority: high
|
|
|
|
- name: low
|
|
conditions:
|
|
# is labeled with Optional or Low priority
|
|
- 'label~=^P-(Optional|Low)'
|
|
allow_checks_interruption: true
|
|
priority: low
|