Skip to content

Commit

Permalink
implement mergify rules for release branches
Browse files Browse the repository at this point in the history
We only handled the case of backports previously, but the current
release checklist expects that we can commit PRs to release
branches during a release (e.g. changelogs, because we want the
list of changelog.d files that are actually part of the release).
  • Loading branch information
geekosaur committed Jun 21, 2024
1 parent 315e3f3 commit 3521dee
Showing 1 changed file with 34 additions and 1 deletion.
35 changes: 34 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.

pull_request_rules:

# implementing PR delay logic: apply a label after 2 days of inactivity
Expand Down Expand Up @@ -56,7 +59,37 @@ pull_request_rules:
- label=merge delay passed
- '#approved-reviews-by>=2'

# rebase+merge strategy for backports: require 1 approver instead of 2
# 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'

# 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'

# merge strategy for backports: require 1 approver instead of 2
- actions:
queue:
name: default
Expand Down

0 comments on commit 3521dee

Please sign in to comment.