diff --git a/.mergify.yml b/.mergify.yml new file mode 100644 index 0000000..dae20a9 --- /dev/null +++ b/.mergify.yml @@ -0,0 +1,63 @@ +# [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: + - base=master + actions: + dismiss_reviews: {} + - name: automatic squash-merge when CI passes + conditions: + - base=master + - "#approved-reviews-by>=1" + - 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: + merge: + method: squash + - name: automatic rebase-merge when CI passes + conditions: + - base=master + - "#approved-reviews-by>=1" + - 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: + merge: + method: rebase + - name: automatic merge when CI passes + conditions: + - base=master + - "#approved-reviews-by>=1" + - label=ready-to-merge:merge + - label!=work-in-progress + actions: + merge: + method: merge + - name: automatic merge when CI passes (@tkf) + conditions: + - base=master + - author=tkf + - label=ready-to-merge:merge + - label!=work-in-progress + actions: + merge: + method: merge