From ceef9ff3a581c098cd8236eee8ed81686b8485e3 Mon Sep 17 00:00:00 2001 From: Madhu Rajanna Date: Thu, 26 Sep 2019 13:10:04 +0530 Subject: [PATCH] Backport PR when label is set backport PR to release-v1.2.0 branch from master branch when label is set on PR Signed-off-by: Madhu Rajanna --- .mergify.yml | 8 ++++++++ docs/development-guide.md | 7 +++++++ 2 files changed, 15 insertions(+) diff --git a/.mergify.yml b/.mergify.yml index 262235c83..39c7828cb 100644 --- a/.mergify.yml +++ b/.mergify.yml @@ -19,3 +19,11 @@ 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 diff --git a/docs/development-guide.md b/docs/development-guide.md index 24bd14843..83db19fa3 100644 --- a/docs/development-guide.md +++ b/docs/development-guide.md @@ -89,3 +89,10 @@ 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 + +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.