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

implement mergify rules for release branches #10135

Open
wants to merge 2 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
42 changes: 41 additions & 1 deletion .github/mergify.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Note: We do not use the rebase strategy to merge PRs, because that
# loses information needed by changelog-d to associate commits with PRs.
Comment on lines +1 to +2
Copy link
Collaborator

Choose a reason for hiding this comment

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

It's pretty sad: I'm not a fan of merge commits. But I guess, we have no choice (short of dropping changelog-d or teaching it new tricks)...


pull_request_rules:

# implementing PR delay logic: apply a label after 2 days of inactivity
Expand Down Expand Up @@ -29,6 +32,7 @@ pull_request_rules:
- label=merge me
- label=merge delay passed
- '#approved-reviews-by>=2'
- '-label~=^blocked:'

# merge+squash strategy
- actions:
Expand All @@ -44,6 +48,7 @@ pull_request_rules:
- label=squash+merge me
- label=merge delay passed
- '#approved-reviews-by>=2'
- '-label~=^blocked:'

# merge+no rebase strategy
- actions:
Expand All @@ -55,8 +60,41 @@ pull_request_rules:
- label=merge+no rebase
- label=merge delay passed
- '#approved-reviews-by>=2'
- '-label~=^blocked:'

# merge strategy for release branches
- actions:
queue:
name: default
# Merge with a merge commit
method: merge
# Update the pr branch with rebase, so the history is clean
update_method: rebase
name: Put release branch pull requests in the rebase+merge queue
conditions:
- label=merge me
- base!=master
- -body~=backport
- '#approved-reviews-by>=2'
- '-label~=^blocked:'

# merge+squash strategy for release branches
- actions:
queue:
name: default
method: squash
# both update methods get absorbed by the squash, so we use the most
# reliable
update_method: merge
name: Put release branch pull requests in the squash+merge queue
conditions:
- base!=master
- label=squash+merge me
- -body~=backport
- '#approved-reviews-by>=2'
- '-label~=^blocked:'

# rebase+merge strategy for backports: require 1 approver instead of 2
# merge strategy for backports: require 1 approver instead of 2
- actions:
queue:
name: default
Expand All @@ -70,6 +108,7 @@ pull_request_rules:
- base!=master
- body~=backport
- '#approved-reviews-by>=1'
- '-label~=^blocked:'

# merge+squash strategy for backports: require 1 approver instead of 2
- actions:
Expand All @@ -85,6 +124,7 @@ pull_request_rules:
- base!=master
- body~=backport
- '#approved-reviews-by>=1'
- '-label~=^blocked:'

# backports should be labeled as such
- actions:
Expand Down
Loading