From da361cc8f363b4e0a8b1f21fc9e768562fdc92d4 Mon Sep 17 00:00:00 2001 From: Victor Martinez Date: Wed, 17 Mar 2021 16:56:30 +0000 Subject: [PATCH 1/7] [mergify] backport automation to 7.x, 7.12 and 7.11 --- .mergify.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .mergify.yml diff --git a/.mergify.yml b/.mergify.yml new file mode 100644 index 000000000000..c693ee885dfc --- /dev/null +++ b/.mergify.yml @@ -0,0 +1,25 @@ +pull_request_rules: + - name: backport patches to 7.x branch + conditions: + - base=master + - label=backport-to-7.x + actions: + backport: + branches: + - 7.x + - name: backport patches to 7.12 branch + conditions: + - base=master + - label=backport-to-7.12 + actions: + backport: + branches: + - 7.12 + - name: backport patches to 7.11 branch + conditions: + - base=master + - label=backport-to-7.11 + actions: + backport: + branches: + - 7.11 \ No newline at end of file From edc1caa64c7dd58a051ae84a32c04269f6af84a3 Mon Sep 17 00:00:00 2001 From: Victor Martinez Date: Thu, 18 Mar 2021 21:01:38 +0000 Subject: [PATCH 2/7] Use current labels --- .mergify.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.mergify.yml b/.mergify.yml index c693ee885dfc..c9da668a087a 100644 --- a/.mergify.yml +++ b/.mergify.yml @@ -2,7 +2,7 @@ pull_request_rules: - name: backport patches to 7.x branch conditions: - base=master - - label=backport-to-7.x + - label=v7.13.0 actions: backport: branches: @@ -10,7 +10,7 @@ pull_request_rules: - name: backport patches to 7.12 branch conditions: - base=master - - label=backport-to-7.12 + - label=v7.12.0 actions: backport: branches: @@ -18,7 +18,7 @@ pull_request_rules: - name: backport patches to 7.11 branch conditions: - base=master - - label=backport-to-7.11 + - label=v7.11.0 actions: backport: branches: From bab54e96a9635aed2f97dcb169591d6f0120867c Mon Sep 17 00:00:00 2001 From: Victor Martinez Date: Thu, 18 Mar 2021 21:02:02 +0000 Subject: [PATCH 3/7] Add ask to resolve conflict with the how to --- .mergify.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.mergify.yml b/.mergify.yml index c9da668a087a..5037d6f6aff0 100644 --- a/.mergify.yml +++ b/.mergify.yml @@ -1,4 +1,18 @@ pull_request_rules: + - name: ask to resolve conflict + conditions: + - conflict + actions: + comment: + message: | + This pull request is now in conflicts. Could you fix it @{{author}}? 🙏 + To fixup this pull request, you can check out it locally. See documentation: https://help.github.com/articles/checking-out-pull-requests-locally/ + ``` + git fetch upstream + git checkout -b {{head}} upstream/{{head}} + git merge upstream/{{base}} + git push upstream {{head}} + ``` - name: backport patches to 7.x branch conditions: - base=master From 254b2dd0cda02e99b605f6ad953e5a5a1877e014 Mon Sep 17 00:00:00 2001 From: Victor Martinez Date: Tue, 23 Mar 2021 13:33:25 +0000 Subject: [PATCH 4/7] cosmetic change to validate the mergify --- .mergify.yml | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/.mergify.yml b/.mergify.yml index 5037d6f6aff0..eba2576a94d4 100644 --- a/.mergify.yml +++ b/.mergify.yml @@ -1,18 +1,4 @@ pull_request_rules: - - name: ask to resolve conflict - conditions: - - conflict - actions: - comment: - message: | - This pull request is now in conflicts. Could you fix it @{{author}}? 🙏 - To fixup this pull request, you can check out it locally. See documentation: https://help.github.com/articles/checking-out-pull-requests-locally/ - ``` - git fetch upstream - git checkout -b {{head}} upstream/{{head}} - git merge upstream/{{base}} - git push upstream {{head}} - ``` - name: backport patches to 7.x branch conditions: - base=master @@ -36,4 +22,18 @@ pull_request_rules: actions: backport: branches: - - 7.11 \ No newline at end of file + - 7.11 + - name: ask to resolve conflict + conditions: + - conflict + actions: + comment: + message: | + This pull request is now in conflicts. Could you fix it @{{author}}? 🙏 + To fixup this pull request, you can check out it locally. See documentation: https://help.github.com/articles/checking-out-pull-requests-locally/ + ``` + git fetch upstream + git checkout -b {{head}} upstream/{{head}} + git merge upstream/{{base}} + git push upstream {{head}} + ``` From 840d99ac3107c6894cce7f3b2c419edb47b5c16e Mon Sep 17 00:00:00 2001 From: Victor Martinez Date: Tue, 23 Mar 2021 13:35:27 +0000 Subject: [PATCH 5/7] quote the branches --- .mergify.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.mergify.yml b/.mergify.yml index eba2576a94d4..504be7adf0f8 100644 --- a/.mergify.yml +++ b/.mergify.yml @@ -6,7 +6,7 @@ pull_request_rules: actions: backport: branches: - - 7.x + - "7.x" - name: backport patches to 7.12 branch conditions: - base=master @@ -14,7 +14,7 @@ pull_request_rules: actions: backport: branches: - - 7.12 + - "7.12" - name: backport patches to 7.11 branch conditions: - base=master @@ -22,7 +22,7 @@ pull_request_rules: actions: backport: branches: - - 7.11 + - "7.11" - name: ask to resolve conflict conditions: - conflict From bf22c7e7470315296a29d2f8f17fb60ae3b39136 Mon Sep 17 00:00:00 2001 From: Victor Martinez Date: Wed, 7 Apr 2021 10:47:33 +0100 Subject: [PATCH 6/7] [mergify] use the merged condition Mergify commit status checks won't be waiting for but the backport will happen after the PR has been merged as expected but the checks won't be enabled --- .mergify.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.mergify.yml b/.mergify.yml index 504be7adf0f8..6db2d84a30a3 100644 --- a/.mergify.yml +++ b/.mergify.yml @@ -1,6 +1,7 @@ pull_request_rules: - name: backport patches to 7.x branch conditions: + - merged - base=master - label=v7.13.0 actions: @@ -9,6 +10,7 @@ pull_request_rules: - "7.x" - name: backport patches to 7.12 branch conditions: + - merged - base=master - label=v7.12.0 actions: @@ -17,6 +19,7 @@ pull_request_rules: - "7.12" - name: backport patches to 7.11 branch conditions: + - merged - base=master - label=v7.11.0 actions: @@ -29,7 +32,7 @@ pull_request_rules: actions: comment: message: | - This pull request is now in conflicts. Could you fix it @{{author}}? 🙏 + This pull request is now in conflicts. Could you fix it? 🙏 To fixup this pull request, you can check out it locally. See documentation: https://help.github.com/articles/checking-out-pull-requests-locally/ ``` git fetch upstream From ff1eacaa8ac3dd8f4ad777727b44155dda98ea93 Mon Sep 17 00:00:00 2001 From: Victor Martinez Date: Wed, 7 Apr 2021 16:19:48 +0100 Subject: [PATCH 7/7] Use backport-vMajor.Minor.0 labels for the experimental phase --- .mergify.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.mergify.yml b/.mergify.yml index 6db2d84a30a3..d3793facbbad 100644 --- a/.mergify.yml +++ b/.mergify.yml @@ -3,7 +3,7 @@ pull_request_rules: conditions: - merged - base=master - - label=v7.13.0 + - label=backport-v7.13.0 actions: backport: branches: @@ -12,7 +12,7 @@ pull_request_rules: conditions: - merged - base=master - - label=v7.12.0 + - label=backport-v7.12.0 actions: backport: branches: @@ -21,7 +21,7 @@ pull_request_rules: conditions: - merged - base=master - - label=v7.11.0 + - label=backport-v7.11.0 actions: backport: branches: