Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(mergify): Mergify config needs adjusting for latest mergify releases #6321

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 25 additions & 11 deletions .mergify.yml
Original file line number Diff line number Diff line change
@@ -1,61 +1,75 @@
queue_rules:
- name: default
conditions:
- status-success=build
merge_method: squash
queue_conditions:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From https://docs.mergify.com/configuration/file-format/#queue-rules it looks like we don't need to duplicate queue_conditions in merge_conditions. From https://docs.mergify.com/merge-queue/setup/#configuring-the-merge-queue-rules it looks like we only need one. I'd probably stick with queue_conditions and ditch merge_conditions.

- check-success=build
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One bizarre thing: I couldn't find the previous "status-success" field anyplace in mergify docs...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mergifyio/mergify#2039 only place I found which had me wondering if something was "off" for a long time :(

- check-success=it-test
merge_conditions:
- check-success=build
- check-success=it-test
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I WILL note - mergify obeys/automatically checks branch protection rules, aka... if we set these in the branch protection rules IN THEORY that should take care of all of this vs. needing to set in the mergify config. These let you adjust and work with branch protection rules, so if we wanted to tweak for additional checks or other stuff we can... I've not seen our branch protection rules to compare though.


pull_request_rules:
- name: Make sure PR are up to date before merging
description: This automatically updates PRs when they are out-of-date with the
base branch to avoid semantic conflicts (next step is using a merge queue).
conditions: []
actions:
update:
- name: Automatically merge backports to releases on succesful build
conditions:
- base~=^(release-)
- head~=^mergify\/bp\/
- "author=mergify[bot]"
actions:
queue:
name: default
label:
add: ["auto merged"]
- name: Automatically merge on CI success and review
conditions:
- base=master
- status-success=build
- "label=ready to merge"
- "approved-reviews-by=@oss-approvers"
- "#approved-reviews-by>=1"
actions:
queue:
method: squash
name: default
label:
add: ["auto merged"]
- name: Automatically merge release branch changes on CI success and release manager review
conditions:
- base~=^release-
- status-success=build
- "label=ready to merge"
- "approved-reviews-by=@release-managers"
actions:
queue:
method: squash
name: default
label:
add: ["auto merged"]
- name: Automatically merge PRs from maintainers on CI success and review
conditions:
- base=master
- status-success=build
- "label=ready to merge"
- "author=@oss-approvers"
- "#approved-reviews-by>=1"
actions:
queue:
method: squash
name: default
label:
add: ["auto merged"]
- name: Automatically merge autobump PRs on CI success
conditions:
- base~=^(master|release-)
- status-success=build
- "label~=autobump-*"
- "author:spinnakerbot"
actions:
queue:
method: squash
name: default
label:
add: ["auto merged"]
- name: Request reviews for autobump PRs on CI failure
conditions:
- base~=^(master|release-)
- status-failure=build
- "label~=autobump-*"
- base=master
actions:
Expand Down
Loading