bot: auto-merge pull request under conditions

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 <seb@redhat.com>
This commit is contained in:
Sébastien Han
2020-11-13 10:13:44 +01:00
parent 6403fe5e89
commit 841efd1d94
+35
View File
@@ -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: