mirror of
https://gitee.com/milvus-io/milvus.git
synced 2024-11-30 02:48:45 +08:00
7303036c19
Use real issue example will combine too many pr metioned make the pr author annoying Signed-off-by: Jenny Li <jing.li@zilliz.com>
267 lines
6.9 KiB
YAML
267 lines
6.9 KiB
YAML
pull_request_rules:
|
|
- name: Add needs-dco label when DCO check failed
|
|
conditions:
|
|
- or:
|
|
- base=master
|
|
- base~=^2(\.\d+){2}$
|
|
- -status-success=DCO
|
|
actions:
|
|
label:
|
|
remove:
|
|
- dco-passed
|
|
add:
|
|
- needs-dco
|
|
|
|
- name: Add dco-passed label when DCO check passed
|
|
conditions:
|
|
- or:
|
|
- base=master
|
|
- base~=^2(\.\d+){2}$
|
|
- status-success=DCO
|
|
actions:
|
|
label:
|
|
remove:
|
|
- needs-dco
|
|
add:
|
|
- dco-passed
|
|
|
|
- name: Test passed for code changed
|
|
conditions:
|
|
- or:
|
|
- base=master
|
|
- base~=^2(\.\d+){2}$
|
|
- "status-success=Code Checker AMD64 Ubuntu 18.04"
|
|
- "status-success=Build and test AMD64 Ubuntu 18.04"
|
|
- "status-success=Code Checker MacOS 11"
|
|
- "status-success=Code Checker CentOS 7"
|
|
- "status-success=continuous-integration/jenkins/pr-merge"
|
|
- "status-success=codecov/patch"
|
|
- "status-success=codecov/project"
|
|
actions:
|
|
label:
|
|
add:
|
|
- ci-passed
|
|
|
|
- name: Test passed for tests changed
|
|
conditions:
|
|
- or:
|
|
- base=master
|
|
- base~=^2(\.\d+){2}$
|
|
- -files~=^(?!tests\/python_client).+
|
|
- "status-success=continuous-integration/jenkins/pr-merge"
|
|
actions:
|
|
label:
|
|
add:
|
|
- ci-passed
|
|
|
|
- name: Test passed for docs changed only
|
|
conditions:
|
|
- or:
|
|
- base=master
|
|
- base~=^2(\.\d+){2}$
|
|
- -files~=^(?!.*\.(md)).*$
|
|
actions:
|
|
label:
|
|
add:
|
|
- ci-passed
|
|
|
|
|
|
- name: Test passed for non go or c++ code changed
|
|
conditions:
|
|
- or:
|
|
- base=master
|
|
- base~=^2(\.\d+){2}$
|
|
- -files~=^(?=.*((\.(go|h|cpp)|CMakeLists.txt))).*$
|
|
- "status-success=continuous-integration/jenkins/pr-merge"
|
|
actions:
|
|
label:
|
|
add:
|
|
- ci-passed
|
|
|
|
- name: Test passed for go unittest code changed
|
|
conditions:
|
|
- or:
|
|
- base=master
|
|
- base~=^2(\.\d+){2}$
|
|
- "status-success=Code Checker AMD64 Ubuntu 18.04"
|
|
- "status-success=Build and test AMD64 Ubuntu 18.04"
|
|
- "status-success=Code Checker MacOS 11"
|
|
- "status-success=Code Checker CentOS 7"
|
|
- -files~=^(?!internal\/.*_test\.go).*$
|
|
actions:
|
|
label:
|
|
add:
|
|
- ci-passed
|
|
|
|
- name: Test passed for mergify changed
|
|
conditions:
|
|
- or:
|
|
- base=master
|
|
- base~=^2(\.\d+){2}$
|
|
- -files~=^(?!\.github\/mergify\.yml).*$
|
|
actions:
|
|
label:
|
|
add:
|
|
- ci-passed
|
|
|
|
- name: Test passed for title skip e2e
|
|
conditions:
|
|
- or:
|
|
- base=master
|
|
- base~=^2(\.\d+){2}$
|
|
- title~=\[skip e2e\]
|
|
- label=kind/improvement
|
|
- -files~=^(?=.*((\.(go|h|cpp)|CMakeLists.txt))).*$
|
|
actions:
|
|
label:
|
|
add:
|
|
- ci-passed
|
|
|
|
|
|
- name: Blocking PR if missing a related issue or PR doesn't have kind/improvement label
|
|
conditions:
|
|
- or:
|
|
- base=master
|
|
- base~=^2(\.\d+){2}$
|
|
- and:
|
|
- -body~=\#[0-9]{1,6}(\s+|$)
|
|
- -body~=https://github.com/milvus-io/milvus/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:
|
|
- or:
|
|
- and:
|
|
- or:
|
|
- base=master
|
|
- base~=^2(\.\d+){2}$
|
|
- or:
|
|
- body~=\#[0-9]{1,6}(\s+|$)
|
|
- body~=https://github.com/milvus-io/milvus/issues/[0-9]{1,6}(\s+|$)
|
|
- and:
|
|
- base=master
|
|
- label=kind/improvement
|
|
actions:
|
|
label:
|
|
remove:
|
|
- do-not-merge/missing-related-issue
|
|
|
|
- name: Dismiss block label if automated create PR
|
|
conditions:
|
|
- or:
|
|
- base=master
|
|
- base~=^2(\.\d+){2}$
|
|
- title~=\[automated\]
|
|
actions:
|
|
label:
|
|
remove:
|
|
- do-not-merge/missing-related-issue
|
|
|
|
- name: Test passed for skip e2e
|
|
conditions:
|
|
- or:
|
|
- base=master
|
|
- base~=^2(\.\d+){2}$
|
|
- title~=\[skip e2e\]
|
|
- "status-success=Code Checker AMD64 Ubuntu 18.04"
|
|
- "status-success=Build and test AMD64 Ubuntu 18.04"
|
|
- "status-success=Code Checker MacOS 11"
|
|
- "status-success=Code Checker CentOS 7"
|
|
- files~=^(?=.*((\.(go|h|cpp)|CMakeLists.txt))).*$
|
|
actions:
|
|
label:
|
|
add:
|
|
- ci-passed
|
|
|
|
|
|
|
|
- name: Remove ci-passed label when status for code checker or ut is not success
|
|
conditions:
|
|
- or:
|
|
- base=master
|
|
- base~=^2(\.\d+){2}$
|
|
- files~=^(?=.*((\.(go|h|cpp)|CMakeLists.txt))).*$
|
|
- or:
|
|
- "status-success!=Code Checker AMD64 Ubuntu 18.04"
|
|
- "status-success!=Build and test AMD64 Ubuntu 18.04"
|
|
- "status-success!=Code Checker MacOS 11"
|
|
- "status-success!=Code Checker CentOS 7"
|
|
actions:
|
|
label:
|
|
remove:
|
|
- ci-passed
|
|
|
|
- name: Remove ci-passed label when status for jenkins job is not success
|
|
conditions:
|
|
- or:
|
|
- base=master
|
|
- base~=^2(\.\d+){2}$
|
|
- -title~=\[skip e2e\]
|
|
- files~=^(?!(internal\/.*_test\.go|.*\.md)).*$
|
|
- "status-success!=continuous-integration/jenkins/pr-merge"
|
|
actions:
|
|
label:
|
|
remove:
|
|
- ci-passed
|
|
|
|
|
|
- name: Add comment when jenkins job failed
|
|
conditions:
|
|
- or:
|
|
- base=master
|
|
- base~=^2(\.\d+){2}$
|
|
- "check-failure=continuous-integration/jenkins/pr-merge"
|
|
actions:
|
|
comment:
|
|
message: |
|
|
@{{author}} E2e jenkins job failed, comment `/run-checks` can trigger the job again.
|
|
|
|
- name: Add comment when code checker or ut failed
|
|
conditions:
|
|
- or:
|
|
- base=master
|
|
- base~=^2(\.\d+){2}$
|
|
- or:
|
|
- "check-failure=Code Checker AMD64 Ubuntu 18.04"
|
|
- "check-failure=Build and test AMD64 Ubuntu 18.04"
|
|
actions:
|
|
comment:
|
|
message: |
|
|
@{{author}} ut workflow job failed, comment `rerun ut` can trigger the job again.
|
|
|
|
|
|
|
|
|
|
- name: Add `needs-rebase` label when more than one commit in pr
|
|
conditions:
|
|
- or:
|
|
- base=master
|
|
- base~=^2(\.\d+){2}$
|
|
- "#commits>1"
|
|
actions:
|
|
comment:
|
|
message: |
|
|
@{{author}}, please be sure the pr should only have one commit, check https://github.com/milvus-io/milvus/blob/master/CODE_REVIEW.md for more details.
|
|
label:
|
|
add:
|
|
- needs-rebase
|
|
|
|
- name: Remove `needs-rebase` label when only one commit in pr
|
|
conditions:
|
|
- or:
|
|
- base=master
|
|
- base~=^2(\.\d+){2}$
|
|
- "#commits=1"
|
|
actions:
|
|
label:
|
|
remove:
|
|
- needs-rebase |