Skip to content

Commit

Permalink
ci(Mergify): configuration update
Browse files Browse the repository at this point in the history
Signed-off-by: Phoenix <[email protected]>
  • Loading branch information
Phoenix500526 committed Apr 16, 2024
1 parent b98e005 commit 9649948
Showing 1 changed file with 61 additions and 9 deletions.
70 changes: 61 additions & 9 deletions .mergify.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,67 @@
pull_request_rules:
- name: Automatic merge on approval
conditions:
- "#approved-reviews-by>=2"
- check-success=Validation
- check-success=Tests Normal
- check-success=Tests Madsim
- check-success=Commit Message Validation
- check-success=Spell Check
- check-success=DCO
- status-success="codecov/patch"
- status-success="codecov/project"
- or:
- "#approved-reviews-by >= 2"
- and:
- author = dependabot[bot]
- "#approved-reviews-by>=1"
- or:
- "#check-failure=0"
- and:
- "#check-failure=1"
- check-failure="codecov/patch"
- and:
- "#check-failure=1"
- check-failure="codecov/project"
- and:
- "#check-failure=2"
- check-failure="codecov/patch"
- check-failure="codecov/project"
actions:
merge:
method: rebase

- name: convert to draft
conditions:
- and:
- "#check-failure>0"
- check-failure="codecov/patch"
- check-failure="codecov/project"
actions:
comment:
message: "@{{author}} Convert your pr to draft since CI failed"
edit:
draft: true

- name: automatic approval for Dependabot pull requests
conditions:
- author=dependabot[bot]
actions:
review:
type: APPROVE
message: Automatically approving dependabot

- name: comment when a pull request is merged
conditions:
- conflict
actions:
comment:
message: "@{{author}} Your PR is in conflict and cannot be merged."

- name: rebase pull request when it's more than 10 commits behind main
conditions:
- base=main
- "#commits-behind>=10"
actions:
rebase:

- name: balanced review assignment
conditions:
- base=main
- author!=dependabot[bot]
actions:
request_reviews:
teams:
- "@XlineTeam"
random_count: 2

0 comments on commit 9649948

Please sign in to comment.