Skip to content

Commit

Permalink
ci(mergify): clarify queue_conditions and merge_conditions (#9510)
Browse files Browse the repository at this point in the history
`queue_conditions` prevent a PR from entering the merge queue. What we
really want is `merge_conditions`, which allows PRs to embark on the
merge train while integration tests are still running, and only actually
merge when the tests are successful.

Also, we can use `queue_conditions` to consolidate and clean up the
condition logic in our `pull_request_rules`.

https://docs.mergify.com/merge-queue/setup/#configuring-the-merge-queue-rules

Tested successfully in Agoric/mergify-experiements#13
  • Loading branch information
michaelfig committed Jun 14, 2024
2 parents 5856dc0 + 7247bd9 commit 30e56ae
Showing 1 changed file with 13 additions and 33 deletions.
46 changes: 13 additions & 33 deletions .mergify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,19 @@ queue_rules:
{{ body | trim }}
queue_conditions:
- base=master
- or:
- check-pending=integration-test-result
- check-success=integration-test-result
- label=bypass:integration
- or:
- and: # breakage succeeds like we thought
- check-success=breakage
- -label=proto:expect-breakage
- and: # breakage fails like we thought
- check-failure=breakage
- label=proto:expect-breakage
merge_conditions:
- base=master
# Require integration tests before merging only
- or:
Expand All @@ -20,17 +33,6 @@ pull_request_rules:
- or:
- '#commits-behind=0'
- label=bypass:linear-history
- or:
- check-pending=integration-test-result
- check-success=integration-test-result
- label=bypass:integration
- or:
- and: # breakage succeeds like we thought
- check-success=breakage
- -label=proto:expect-breakage
- and: # breakage fails like we thought
- check-failure=breakage
- label=proto:expect-breakage
actions:
queue:
name: main
Expand All @@ -39,17 +41,6 @@ pull_request_rules:
conditions:
- base=master
- label=automerge:rebase
- or:
- check-pending=integration-test-result
- check-success=integration-test-result
- label=bypass:integration
- or:
- and: # breakage succeeds like we thought
- check-success=breakage
- -label=proto:expect-breakage
- and: # breakage fails like we thought
- check-failure=breakage
- label=proto:expect-breakage
actions:
queue:
name: main
Expand All @@ -59,17 +50,6 @@ pull_request_rules:
conditions:
- base=master
- label=automerge:squash
- or:
- check-pending=integration-test-result
- check-success=integration-test-result
- label=bypass:integration
- or:
- and: # breakage succeeds like we thought
- check-success=breakage
- -label=proto:expect-breakage
- and: # breakage fails like we thought
- check-failure=breakage
- label=proto:expect-breakage
actions:
queue:
name: main
Expand Down

0 comments on commit 30e56ae

Please sign in to comment.