Skip to content

Commit

Permalink
ci(mergify): upgrade conf to use MP
Browse files Browse the repository at this point in the history
This implements a few changes:
- leverage MP to check for CI
- leverage MP to check for review requirements

Change-Id: Ie0cf04c506b7f2e2c92e49b2faa5f801b665b145
  • Loading branch information
jd committed Mar 5, 2025
1 parent 637a0dd commit 583f0bb
Showing 1 changed file with 42 additions and 25 deletions.
67 changes: 42 additions & 25 deletions .mergify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,37 @@ shared:
{{ body }}
allow_inplace_checks: true
merge_method: squash
CheckRuns: &CheckRuns
- check-success=lint
- check-success=test
- or:
- label = ignore-broken-links
- check-success = test-broken-links
- or:
- check-success=Cloudflare Pages
# fork can't have the preview build
- "-head-repo-full-name~=^Mergifyio/"

queue_rules:
- name: hotfix
<<: *DefaultQueueOptions
queue_conditions:
- or:
merge_protections:
- name: 🤖 Continuous Integration
if:
- label != hotfix
success_conditions:
- and: &CheckRuns
- check-success = lint
- check-success = test
- or:
- label = ignore-broken-links
- check-success = test-broken-links
- or:
- check-success=Cloudflare Pages
# fork can't have the preview build
- "-head-repo-full-name~=^Mergifyio/"

- name: 👀 Review Requirements
if:
- label != hotfix
success_conditions:
- or: &DefaultReviewCond
- "#approved-reviews-by >= 2"
- author = dependabot[bot]
- author = mergify-ci-bot

- name: 🧑‍🚒 Hotfix Review Requirements
if:
- label = hotfix
success_conditions:
- or: &HotfixReviewCond
# Author is engineering manager, we allow with one review
- and:
- author=@eng-mgr
Expand All @@ -36,23 +51,25 @@ queue_rules:
- and:
- title~=^(revert|fix)
- "#approved-reviews-by>=1"
- label=hotfix
- "#changes-requested-reviews-by=0"
- "#review-requested=0"

- or: *DefaultReviewCond

# yamllint disable-line rule:line-length
- body ~= (Fix|Related).* (INC-\d+|ENGINE-\d+|https:\/\/github\.com\/Mergifyio\/engine\/security\/dependabot\/\d+)

queue_rules:
- name: hotfix
<<: *DefaultQueueOptions
queue_conditions:
- label = hotfix
merge_conditions:
- and: *CheckRuns

- name: default
<<: *DefaultQueueOptions
queue_conditions:
- and: *CheckRuns
- "#approved-reviews-by>=2"
- "#changes-requested-reviews-by=0"
- "#review-threads-unresolved=0"
- "#review-requested=0"
- label!=manual merge
merge_conditions:
- and: *CheckRuns
- schedule=Mon-Fri 09:00-17:30[Europe/Paris]

- name: lowprio
Expand All @@ -72,7 +89,6 @@ queue_rules:
- "title~=^chore: bump"
- author=dependabot[bot]
merge_conditions:
- and: *CheckRuns
- schedule=Mon-Fri 09:00-17:00[Europe/Paris]
batch_size: 7
batch_max_wait_time: 5min
Expand All @@ -82,6 +98,7 @@ queue_rules:
pull_request_rules:
- name: automatic merge
conditions:
- label != manual merge
- base=main
actions:
queue:
Expand Down

0 comments on commit 583f0bb

Please sign in to comment.