diff --git a/.mergify.yml b/.mergify.yml index 39c7828cb..822f3b491 100644 --- a/.mergify.yml +++ b/.mergify.yml @@ -27,3 +27,19 @@ pull_request_rules: 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: {} diff --git a/docs/development-guide.md b/docs/development-guide.md index 83db19fa3..863a22279 100644 --- a/docs/development-guide.md +++ b/docs/development-guide.md @@ -90,9 +90,14 @@ 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. -### Backporting a PR to release branch +### Backport a Fix to a Release Branch -If the PR needs to be backported to a release branch, a project maintainer adds -`backport-to-release-vX.Y.Z` label to the PR. Mergify bot will take care of -sending the backport PR to release branch once the PR is merged in the 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.