From c2d36c33436c0b24a7e9f28f6a879eba7ff53b53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Han?= Date: Thu, 25 Nov 2021 18:46:44 +0100 Subject: [PATCH] bot: add bot message when pushing on a release branch MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Normally, only the mergify bot should send out PR to the release branches. All contributions should generally go in master first then be backported. Let's warn to avoid merging PR send against a release branch. Signed-off-by: Sébastien Han --- .mergify.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.mergify.yml b/.mergify.yml index bde05f5f5b8a..6bcd1e4aceec 100644 --- a/.mergify.yml +++ b/.mergify.yml @@ -7,6 +7,14 @@ pull_request_rules: comment: message: This pull request has merge conflicts that must be resolved before it can be merged. @{{author}} please rebase it. https://rook.io/docs/rook/latest/development-flow.html#updating-your-fork + - name: ping author on direct push to release branch + conditions: + - base~=^release- + - author!=mergify[bot] + actions: + comment: + message: Hi @{{author}}, this pull request was opened against a release branch, is it expected? Normally patches should go in the master branch first and then be backported to release branches. + # automerge on master only under certain strict conditions - name: automerge merge master with specific label and approvals with code change conditions: