Skip to content

Commit

Permalink
Use protected branch instead of manual listing in .mergify.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
tkf committed Sep 9, 2020
1 parent 7e5799d commit 0fdbef8
Showing 1 changed file with 27 additions and 8 deletions.
35 changes: 27 additions & 8 deletions .mergify.yml
@@ -1,3 +1,6 @@
# [NOTE] This setting relies on "required status check":
# https://docs.github.com/en/github/administering-a-repository/about-required-status-checks

pull_request_rules:
- name: remove outdated reviews
conditions:
Expand All @@ -8,7 +11,15 @@ pull_request_rules:
conditions:
- base=master
- "#approved-reviews-by>=1"
- status-success=Travis CI - Pull Request
- label=ready-to-merge:squash
- label!=work-in-progress
actions:
merge:
method: squash
- name: automatic squash-merge when CI passes (@tkf)
conditions:
- base=master
- author=tkf
- label=ready-to-merge:squash
- label!=work-in-progress
actions:
Expand All @@ -18,7 +29,15 @@ pull_request_rules:
conditions:
- base=master
- "#approved-reviews-by>=1"
- status-success=Travis CI - Pull Request
- label=ready-to-merge:rebase
- label!=work-in-progress
actions:
merge:
method: rebase
- name: automatic rebase-merge when CI passes (@tkf)
conditions:
- base=master
- author=tkf
- label=ready-to-merge:rebase
- label!=work-in-progress
actions:
Expand All @@ -28,17 +47,17 @@ pull_request_rules:
conditions:
- base=master
- "#approved-reviews-by>=1"
- status-success=Travis CI - Pull Request
- label=ready-to-merge:merge
- label!=work-in-progress
actions:
merge:
method: merge
- name: automatically approve PR when pushed by me
- name: automatic merge when CI passes (@tkf)
conditions:
- author=tkf
- base=master
- status-success=Travis CI - Pull Request
- label~=ready-to-merge:.*
- author=tkf
- label=ready-to-merge:merge
- label!=work-in-progress
actions:
review: {}
merge:
method: merge

0 comments on commit 0fdbef8

Please sign in to comment.