Add mergify rule to auto merge backported PR

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
(cherry picked from commit 136d81b736)
This commit is contained in:
Madhu Rajanna 2019-09-27 13:50:12 +05:30 committed by mergify[bot]
parent 454394322a
commit 39d30ef77a
2 changed files with 34 additions and 0 deletions

View File

@ -19,3 +19,27 @@ pull_request_rules:
strict: smart
dismiss_reviews: {}
delete_head_branch: {}
- name: backport patches to release branch
conditions:
- base=master
- label=backport-to-release-v1.2.0
actions:
backport:
branches:
- release-v1.2.0
# automerge backports if CI successfully ran
- name: automerge backport release-v1.2.0
conditions:
- author=mergify[bot]
- base=release-v1.2.0
- label!=DNM
- "#changes-requested-reviews-by=0"
- "#approved-reviews-by>=1"
- "status-success=continuous-integration/travis-ci/pr"
actions:
merge:
method: rebase
rebase_fallback: merge
strict: smart
dismiss_reviews: {}
delete_head_branch: {}

View File

@ -89,3 +89,13 @@ need to be met before it will be merged:
When the criteria are met, a project maintainer can merge your changes into
the project's master branch.
The flow for getting a fix into a release branch is:
1. Open a PR to merge the changes to master following the process outlined above.
1. Add the backport label to that PR such as `backport-to-release-vX.Y.Z`
1. After your PR is merged to master, the mergify bot will automatically open a
PR with your commits backported to the release branch
1. If there are any conflicts you will need to resolve them by pulling the
branch, resolving the conflicts and force push back the branch
1. After the CI is green, the bot will automatically merge the backport PR.