Skip to content

Commit

Permalink
Add mergify (#22)
Browse files Browse the repository at this point in the history
Signed-off-by: Bennu-Li <[email protected]>
  • Loading branch information
Bennu-Li authored Apr 4, 2023
1 parent 7b88b84 commit dc7d441
Show file tree
Hide file tree
Showing 2 changed files with 89 additions and 0 deletions.
85 changes: 85 additions & 0 deletions .github/mergify.yml
Original file line number Diff line number Diff line change
@@ -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: #<xyz>”)
- 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
4 changes: 4 additions & 0 deletions OWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,9 @@ filters:
".*":
reviewers:
- SimFG
- xiaofan-luan
- cxie
approvers:
- SimFG
- xiaofan-luan
- cxie

0 comments on commit dc7d441

Please sign in to comment.