Skip to content

Commit

Permalink
🎨 Trying to make Mergify use the merge queue (ITISFoundation#7116)
Browse files Browse the repository at this point in the history
Co-authored-by: Andrei Neagu <[email protected]>
  • Loading branch information
GitHK and Andrei Neagu authored Jan 28, 2025
1 parent e042a69 commit 6e5ae15
Showing 1 changed file with 38 additions and 38 deletions.
76 changes: 38 additions & 38 deletions .github/mergify.yml
Original file line number Diff line number Diff line change
@@ -1,46 +1,46 @@
pull_request_rules:
- name: Automatic merge
description: Conditions required for automatic merging of a PR
conditions:
# let Mergify know that the PR can be merged (added manually)
- label = πŸ€–-automerge
# block Mergify from merging the PR (added manually)
- label != πŸ€–-do-not-merge

# list of CI checks that need to pass in order for the PR to be merged
- check-success=unit-tests
- check-success=integration-tests
- check-success=system-tests
queue_rules:
- name: default
queue_conditions:
# general prerequisits fo accept the PR in the queue
- label=πŸ€–-automerge # let Mergify know that the PR can be merged (added manually)
- label!=πŸ€–-do-not-merge # block Mergify from merging the PR (added manually)
- base=master
- -draft # PR is not in draft state
- -conflict # No merge conflicts

# Check for required reviews
- "#approved-reviews-by>=2" # Requires 2 approving reviews
- "#changes-requested-reviews-by=0" # No changes requested
- "#review-threads-unresolved=0" # All review threads resolved
# Check for required reviews
- "#approved-reviews-by>=2" # Requires 2 approving reviews
- "#changes-requested-reviews-by=0" # No changes requested
- "#review-threads-unresolved=0" # All review threads resolved

# Optional but recommended checks
- base=master
- -draft # PR is not in draft state
- -conflict # No merge conflicts
actions:
merge:
merge_conditions:
# list of CI checks that need to pass
- check-success=unit-tests
- check-success=integration-tests
- check-success=system-tests

- name: automatic update for PR ready to be merged
conditions:
- -draft
- label=πŸ€–-automerge
actions:
update:
pull_request_rules:
- name: update branch if behind master
conditions:
- queue-name=default # only run if already queued
- label=πŸ€–-automerge
- label!=πŸ€–-do-not-merge
- base=master
actions:
update:

- name: retry CI on failure
conditions:
- base=master
- or:
- name: retry CI on fails (used for flaky tests)
conditions:
- queue-name=default # only run if already queued
- label=πŸ€–-automerge
- label!=πŸ€–-do-not-merge
- base=master
- or:
- check-failure=unit-tests
- check-failure=integration-tests
- check-failure=system-tests
actions:
github_actions:
workflow:
dispatch:
actions:
github_actions:
workflow:
dispatch:
- workflow: .github/workflows/ci-testing-deploy.yml

0 comments on commit 6e5ae15

Please sign in to comment.