diff --git a/.github/mergify.yml b/.github/mergify.yml new file mode 100644 index 00000000..40fb3501 --- /dev/null +++ b/.github/mergify.yml @@ -0,0 +1,85 @@ +pull_request_rules: + - name: Add needs-dco label when DCO check failed + conditions: + - base=main + - -status-success=DCO + actions: + label: + remove: + - dco-passed + add: + - needs-dco + + - name: Add dco-passed label when DCO check passed + conditions: + - base=main + - status-success=DCO + actions: + label: + remove: + - needs-dco + add: + - dco-passed + + - name: Blocking PR if missing a related issue or PR doesn't have kind/improvement label + conditions: + - base=main + - and: + - -body~=\#[0-9]{1,6}(\s+|$) + - -body~=https://github.com/zilliztech/GPTCache/issues/[0-9]{1,6}(\s+|$) + - -label=kind/improvement + - -title~=\[automated\] + actions: + label: + add: + - do-not-merge/missing-related-issue + comment: + message: | + @{{author}} Please associate the related issue to the body of your Pull Request. (eg. “issue: #”) + + - name: Dismiss block label if related issue be added into PR + conditions: + - base=main + - or: + - or: + - body~=\#[0-9]{1,6}(\s+|$) + - body~=https://github.com/milvus-io/knowhere/issues/[0-9]{1,6}(\s+|$) + - label=kind/improvement + actions: + label: + remove: + - do-not-merge/missing-related-issue + + - name: Test passed for code changed + conditions: + - base=main + - "status-success=test-gpt-cache-cli-main (map)" + - "status-success=test-gpt-cache-cli-main (sqlite_faiss_mock)" + - "status-success=test-gpt-cache-cli-main (sqlite_faiss_towhee)" + actions: + label: + add: + - ci-passed + + - name: Test passed for title skip ci + conditions: + - base=main + - title~=\[skip ci\] + - -files~=^(?=.*((\.(sh|py)|Makefile))).*$ + actions: + label: + add: + - ci-passed + + - name: Remove ci-passed label when ut failed for main + conditions: + - base=main + - or: + - "status-success!=test-gpt-cache-cli-main (map)" + - "status-success!=test-gpt-cache-cli-main (sqlite_faiss_mock)" + - "status-success!=test-gpt-cache-cli-main (sqlite_faiss_towhee)" + - files~=^(?=.*((\.(sh|py)|Makefile))).*$ + actions: + label: + remove: + - ci-passed diff --git a/OWNERS b/OWNERS index e5413bb2..acd30178 100644 --- a/OWNERS +++ b/OWNERS @@ -2,5 +2,9 @@ filters: ".*": reviewers: - SimFG + - xiaofan-luan + - cxie approvers: - SimFG + - xiaofan-luan + - cxie