From 841efd1d9455f4e5bbe6a40fde4a4aef871bc158 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Han?= Date: Mon, 9 Nov 2020 10:41:05 +0100 Subject: [PATCH] bot: auto-merge pull request under conditions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We now allow mergify to auto-merge pull requests against the master branch under the following conditions: * all CI tests passed * the PR has no label 'do-not-merge' * the PR has the label 'ready-to-merge' * has been approved by at least one maintainer * has not requested changes Signed-off-by: Sébastien Han --- .mergify.yml | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/.mergify.yml b/.mergify.yml index 5413d7653..766a5842b 100644 --- a/.mergify.yml +++ b/.mergify.yml @@ -8,6 +8,7 @@ pull_request_rules: label: add: - ceph + # if there is a conflict in a backport PR, ping the author to send a proper backport PR - name: ping author on conflicts conditions: @@ -15,6 +16,38 @@ pull_request_rules: actions: 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/master/development-flow.html#updating-your-fork + + # automerge on master only under certain strict conditions + - name: automerge merge master with specific label and approvals + conditions: + - author=mergify[bot] + - base=master + - "#approved-reviews-by>=1" + - "#changes-requested-reviews-by=0" + - label!=do-not-merge + - label=ready-to-merge + - 'check-success=DCO' + - 'check-success=continuous-integration/jenkins/pr-head' + - 'check-success=canary' + - 'check-success=unittests' + - 'check-success=golangci-lint' + - 'check-success=codegen' + - 'check-success=lint' + - 'check-success=modcheck' + - 'check-success=pvc' + - 'check-success=pvc-db' + - 'check-success=pvc-db-wal' + - 'check-success=encryption-pvc' + - 'check-success=encryption-pvc-db' + - 'check-success=encryption-pvc-db-wal' + - 'check-success=encryption-pvc-kms-vault-token-auth' + actions: + merge: + method: merge + strict: false + dismiss_reviews: {} + delete_head_branch: {} + # automerge backports if CI successfully ran # release-1.3 branch - name: automerge backport release-1.3 @@ -58,6 +91,7 @@ pull_request_rules: strict: false dismiss_reviews: {} delete_head_branch: {} + # Trigger backport PRs based on label # release-1.3 branch - actions: @@ -67,6 +101,7 @@ pull_request_rules: conditions: - label=backport-release-1.3 name: backport release-1.3 + # release-1.4 branch - actions: backport: