From c9488eb1f9451fdcadfe5b4444ae8a747f112bc8 Mon Sep 17 00:00:00 2001 From: David Ko Date: Wed, 21 Dec 2022 17:05:05 +0800 Subject: [PATCH] ci: add mergify for auto merge Signed-off-by: David Ko --- .github/mergify.yml | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/mergify.yml diff --git a/.github/mergify.yml b/.github/mergify.yml new file mode 100644 index 0000000..2dd1aee --- /dev/null +++ b/.github/mergify.yml @@ -0,0 +1,34 @@ +pull_request_rules: +- name: automatic merge after review + conditions: + - check-success=continuous-integration/drone/pr + - check-success=DCO + - check-success=CodeFactor + - check-success=codespell + - "#approved-reviews-by>=1" + - approved-reviews-by=@longhorn/maintainer + - label=ready-to-merge + actions: + merge: + method: rebase + +- name: ask to resolve conflict + conditions: + - conflict + actions: + comment: + message: This pull request is now in conflicts. Could you fix it @{{author}}? 🙏 + +# Comment on the PR to trigger backport. ex: @Mergifyio copy stable/3.1 stable/4.0 +- name: backport patches to stable branch + conditions: + - base=master + actions: + backport: + title: "[BACKPORT][{{ destination_branch }}] {{ title }}" + body: | + This is an automatic backport of pull request #{{number}}. + + {{cherry_pick_error}} + assignees: + - "{{ author }}" \ No newline at end of file