enhance: [skip e2e] [mergify]replace branch by reference (#36139)

https://github.com/milvus-io/milvus/issues/36140

Signed-off-by: Yellow Shine <sammy.huang@zilliz.com>
This commit is contained in:
yellow-shine 2024-09-10 15:21:07 +08:00 committed by GitHub
parent 9aa01c69f8
commit 9d10f378e1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

157
.github/mergify.yml vendored
View File

@ -10,17 +10,17 @@ misc:
- when_go_sdk_status_success: &WHEN_GO_SDK_STATUS_SUCCESS - when_go_sdk_status_success: &WHEN_GO_SDK_STATUS_SUCCESS
- 'status-success=go-sdk' - 'status-success=go-sdk'
- 'status-success=milvus-sdk-go ' - 'status-success=milvus-sdk-go '
- branch: &BRANCH - branch: &BRANCHES
# In this pull request, the changes are based on the master branch
- &MASTER_BRANCH base=master - &MASTER_BRANCH base=master
# In this pull request, the changes are based on the 2.x(or 2.x.x) branch
- &2X_BRANCH base~=^2(\.\d+){1,2}$ - &2X_BRANCH base~=^2(\.\d+){1,2}$
pull_request_rules: pull_request_rules:
- name: Add needs-dco label when DCO check failed - name: Add needs-dco label when DCO check failed
conditions: conditions:
- or: # branch condition: in this pull request, the changes are based on any branch referenced by BRANCHES
- base=master - or: *BRANCHES
- base=sql_beta
- base~=^2(\.\d+){1,2}$
- -status-success=DCO - -status-success=DCO
actions: actions:
label: label:
@ -34,10 +34,8 @@ pull_request_rules:
- name: Add dco-passed label when DCO check passed - name: Add dco-passed label when DCO check passed
conditions: conditions:
- or: # branch condition: in this pull request, the changes are based on any branch referenced by BRANCHES
- base=master - or: *BRANCHES
- base~=^2(\.\d+){1,2}$
- base=sql_beta
- status-success=DCO - status-success=DCO
actions: actions:
label: label:
@ -84,10 +82,8 @@ pull_request_rules:
- name: Test passed for tests changed - name: Test passed for tests changed
conditions: conditions:
- or: # branch condition: in this pull request, the changes are based on any branch referenced by BRANCHES
- base=master - or: *BRANCHES
- base=sql_beta
- base~=^2(\.\d+){1,2}$
- -files~=^(?!tests\/python_client).+ - -files~=^(?!tests\/python_client).+
- 'status-success=cpu-e2e' - 'status-success=cpu-e2e'
actions: actions:
@ -97,10 +93,8 @@ pull_request_rules:
- name: Test passed for docs changed only - name: Test passed for docs changed only
conditions: conditions:
- or: # branch condition: in this pull request, the changes are based on any branch referenced by BRANCHES
- base=master - or: *BRANCHES
- base=sql_beta
- base~=^2(\.\d+){1,2}$
- -files~=^(?!.*\.(md)).*$ - -files~=^(?!.*\.(md)).*$
actions: actions:
label: label:
@ -109,10 +103,8 @@ pull_request_rules:
- name: Test passed for non go or c++ code changed - name: Test passed for non go or c++ code changed
conditions: conditions:
- or: # branch condition: in this pull request, the changes are based on any branch referenced by BRANCHES
- base=master - or: *BRANCHES
- base=sql_beta
- base~=^2(\.\d+){1,2}$
- 'status-success=cpu-e2e' - 'status-success=cpu-e2e'
- *no_source_code_files - *no_source_code_files
actions: actions:
@ -122,10 +114,8 @@ pull_request_rules:
- name: Test passed for go unittest code changed-master - name: Test passed for go unittest code changed-master
conditions: conditions:
- or: # branch condition: in this pull request, the changes are based on any branch referenced by BRANCHES
- base=master - or: *BRANCHES
- base=sql_beta
- base~=^2(\.\d+){1,2}$
- or: *Build_AND_TEST_STATUS_SUCESS_ON_UBUNTU_20_OR_UBUNTU_22 - or: *Build_AND_TEST_STATUS_SUCESS_ON_UBUNTU_20_OR_UBUNTU_22
- 'status-success=Code Checker AMD64 Ubuntu 22.04' - 'status-success=Code Checker AMD64 Ubuntu 22.04'
# - 'status-success=Code Checker MacOS 12' # - 'status-success=Code Checker MacOS 12'
@ -141,8 +131,8 @@ pull_request_rules:
- name: Test passed for go unittest code changed -2.2.* - name: Test passed for go unittest code changed -2.2.*
conditions: conditions:
- *2X_BRANCH
- or: *Build_AND_TEST_STATUS_SUCESS_ON_UBUNTU_20_OR_UBUNTU_22 - or: *Build_AND_TEST_STATUS_SUCESS_ON_UBUNTU_20_OR_UBUNTU_22
- base~=^2\.2\.\d+$
- 'status-success=Code Checker AMD64 Ubuntu 22.04' - 'status-success=Code Checker AMD64 Ubuntu 22.04'
# - 'status-success=Code Checker MacOS 12' # - 'status-success=Code Checker MacOS 12'
- -files~=^(?!internal\/.*_test\.go).*$ - -files~=^(?!internal\/.*_test\.go).*$
@ -153,10 +143,8 @@ pull_request_rules:
- name: Test passed for mergify changed - name: Test passed for mergify changed
conditions: conditions:
- or: # branch condition: in this pull request, the changes are based on any branch referenced by BRANCHES
- base=master - or: *BRANCHES
- base=sql_beta
- base~=^2(\.\d+){1,2}$
- -files~=^(?!\.github\/mergify\.yml).*$ - -files~=^(?!\.github\/mergify\.yml).*$
actions: actions:
label: label:
@ -165,10 +153,8 @@ pull_request_rules:
- name: Test passed for title skip e2e - name: Test passed for title skip e2e
conditions: conditions:
- or: # branch condition: in this pull request, the changes are based on any branch referenced by BRANCHES
- base=master - or: *BRANCHES
- base=sql_beta
- base~=^2(\.\d+){1,2}$
- title~=\[skip e2e\] - title~=\[skip e2e\]
- label=kind/enhancement - label=kind/enhancement
- *no_source_code_files - *no_source_code_files
@ -179,10 +165,8 @@ pull_request_rules:
- name: Blocking PR if missing a related issue or doesn't have kind/enhancement label - name: Blocking PR if missing a related issue or doesn't have kind/enhancement label
conditions: conditions:
- or: # branch condition: in this pull request, the changes are based on any branch referenced by BRANCHES
- base=master - or: *BRANCHES
- base=sql_beta
- base~=^2(\.\d+){1,2}$
- and: - and:
- -body~=\#[0-9]{1,6}(\s+|$) - -body~=\#[0-9]{1,6}(\s+|$)
- -body~=https://github.com/milvus-io/milvus/issues/[0-9]{1,6}(\s+|$) - -body~=https://github.com/milvus-io/milvus/issues/[0-9]{1,6}(\s+|$)
@ -210,10 +194,8 @@ pull_request_rules:
- name: Dismiss block label if related issue be added into PR - name: Dismiss block label if related issue be added into PR
conditions: conditions:
- and: - and:
- or: # branch condition: in this pull request, the changes are based on any branch referenced by BRANCHES
- base=master - or: *BRANCHES
- base=sql_beta
- base~=^2(\.\d+){1,2}$
- or: - or:
- body~=\#[0-9]{1,6}(\s+|$) - body~=\#[0-9]{1,6}(\s+|$)
- body~=https://github.com/milvus-io/milvus/issues/[0-9]{1,6}(\s+|$) - body~=https://github.com/milvus-io/milvus/issues/[0-9]{1,6}(\s+|$)
@ -224,7 +206,7 @@ pull_request_rules:
- name: Blocking PR if missing a related master PR or doesn't have kind/branch-feature label - name: Blocking PR if missing a related master PR or doesn't have kind/branch-feature label
conditions: conditions:
- base~=^2(\.\d+){1,2}$ - *2X_BRANCH
- and: - and:
- -body~=pr\:\ \#[0-9]{1,6}(\s+|$) - -body~=pr\:\ \#[0-9]{1,6}(\s+|$)
- -body~=https://github.com/milvus-io/milvus/pull/[0-9]{1,6}(\s+|$) - -body~=https://github.com/milvus-io/milvus/pull/[0-9]{1,6}(\s+|$)
@ -240,7 +222,7 @@ pull_request_rules:
- name: Dismiss block label if related pr be added into PR - name: Dismiss block label if related pr be added into PR
conditions: conditions:
- base~=^2(\.\d+){1,2}$ - *2X_BRANCH
- or: - or:
- body~=pr\:\ \#[0-9]{1,6}(\s+|$) - body~=pr\:\ \#[0-9]{1,6}(\s+|$)
- body~=https://github.com/milvus-io/milvus/pull/[0-9]{1,6}(\s+|$) - body~=https://github.com/milvus-io/milvus/pull/[0-9]{1,6}(\s+|$)
@ -252,10 +234,8 @@ pull_request_rules:
- name: Dismiss block label if automated create PR - name: Dismiss block label if automated create PR
conditions: conditions:
- or: # branch condition: in this pull request, the changes are based on any branch referenced by BRANCHES
- base=master - or: *BRANCHES
- base=sql_beta
- base~=^2(\.\d+){1,2}$
- title~=\[automated\] - title~=\[automated\]
actions: actions:
label: label:
@ -265,10 +245,8 @@ pull_request_rules:
- name: Test passed for skip e2e-master - name: Test passed for skip e2e-master
conditions: conditions:
- or: # branch condition: in this pull request, the changes are based on any branch referenced by BRANCHES
- base=master - or: *BRANCHES
- base=sql_beta
- base~=^2(\.\d+){1,2}$
- or: *Build_AND_TEST_STATUS_SUCESS_ON_UBUNTU_20_OR_UBUNTU_22 - or: *Build_AND_TEST_STATUS_SUCESS_ON_UBUNTU_20_OR_UBUNTU_22
- title~=\[skip e2e\] - title~=\[skip e2e\]
- 'status-success=Code Checker AMD64 Ubuntu 22.04' - 'status-success=Code Checker AMD64 Ubuntu 22.04'
@ -285,8 +263,8 @@ pull_request_rules:
- name: Test passed for skip e2e - 2.2.* - name: Test passed for skip e2e - 2.2.*
conditions: conditions:
- *2X_BRANCH
- or: *Build_AND_TEST_STATUS_SUCESS_ON_UBUNTU_20_OR_UBUNTU_22 - or: *Build_AND_TEST_STATUS_SUCESS_ON_UBUNTU_20_OR_UBUNTU_22
- base~=^2\.2\.\d+$
- title~=\[skip e2e\] - title~=\[skip e2e\]
# - 'status-success=Code Checker AMD64 Ubuntu 20.04' # - 'status-success=Code Checker AMD64 Ubuntu 20.04'
- 'status-success=UT for Cpp' - 'status-success=UT for Cpp'
@ -301,10 +279,8 @@ pull_request_rules:
- name: Assign the 'lgtm' and 'approved' labels following the successful testing of the 'Update Knowhere Commit' - name: Assign the 'lgtm' and 'approved' labels following the successful testing of the 'Update Knowhere Commit'
conditions: conditions:
- or: # branch condition: in this pull request, the changes are based on any branch referenced by BRANCHES
- base=master - or: *BRANCHES
- base=sql_beta
- base~=^2(\.\d+){1,2}$
- 'title~=Update Knowhere Commit' - 'title~=Update Knowhere Commit'
- label=ci-passed - label=ci-passed
actions: actions:
@ -315,11 +291,9 @@ pull_request_rules:
- name: Remove ci-passed label when status for code checker or ut is not success-master - name: Remove ci-passed label when status for code checker or ut is not success-master
conditions: conditions:
# branch condition: in this pull request, the changes are based on any branch referenced by BRANCHES
- or: *BRANCHES
- label!=manual-pass - label!=manual-pass
- or:
- base=master
- base=sql_beta
- base~=^2(\.\d+){1,2}$
- *source_code_files - *source_code_files
- or: - or:
- *failed_on_ubuntu_20 - *failed_on_ubuntu_20
@ -356,11 +330,9 @@ pull_request_rules:
- name: Remove ci-passed label when status for jenkins job is not success - name: Remove ci-passed label when status for jenkins job is not success
conditions: conditions:
# branch condition: in this pull request, the changes are based on any branch referenced by BRANCHES
- or: *BRANCHES
- label!=manual-pass - label!=manual-pass
- or:
- base=master
- base=sql_beta
- base~=^2(\.\d+){1,2}$
- -title~=\[skip e2e\] - -title~=\[skip e2e\]
- files~=^(?!(.*_test\.go|.*\.md)).*$ - files~=^(?!(.*_test\.go|.*\.md)).*$
- 'status-success!=cpu-e2e' - 'status-success!=cpu-e2e'
@ -371,10 +343,8 @@ pull_request_rules:
- name: Add comment when jenkins job failed - name: Add comment when jenkins job failed
conditions: conditions:
- or: # branch condition: in this pull request, the changes are based on any branch referenced by BRANCHES
- base=master - or: *BRANCHES
- base=sql_beta
- base~=^2(\.\d+){1,2}$
- 'check-failure=cpu-e2e' - 'check-failure=cpu-e2e'
actions: actions:
comment: comment:
@ -383,10 +353,8 @@ pull_request_rules:
- name: Add comment when go-sdk check failed - name: Add comment when go-sdk check failed
conditions: conditions:
- or: # branch condition: in this pull request, the changes are based on any branch referenced by BRANCHES
- base=master - or: *BRANCHES
- base=sql_beta
- base~=^2(\.\d+){1,2}$
- 'check-failure=go-sdk' - 'check-failure=go-sdk'
actions: actions:
comment: comment:
@ -395,10 +363,8 @@ pull_request_rules:
- name: Add comment when code checker or ut failed -master - name: Add comment when code checker or ut failed -master
conditions: conditions:
- or: # branch condition: in this pull request, the changes are based on any branch referenced by BRANCHES
- base=master - or: *BRANCHES
- base~=^2(\.\d+){1,2}$
- base=sql_beta
- or: - or:
# - 'check-failure=Code Checker AMD64 Ubuntu 20.04' # - 'check-failure=Code Checker AMD64 Ubuntu 20.04'
- 'check-failure=Build and test AMD64 Ubuntu 20.04' - 'check-failure=Build and test AMD64 Ubuntu 20.04'
@ -409,7 +375,7 @@ pull_request_rules:
- name: Add comment when code checker or ut failed -2.2.* - name: Add comment when code checker or ut failed -2.2.*
conditions: conditions:
- base~=^2\.2\.\d+$ - *2X_BRANCH
- or: - or:
# - 'check-failure=Code Checker AMD64 Ubuntu 20.04' # - 'check-failure=Code Checker AMD64 Ubuntu 20.04'
- 'check-failure=Build and test AMD64 Ubuntu 20.04' - 'check-failure=Build and test AMD64 Ubuntu 20.04'
@ -420,9 +386,8 @@ pull_request_rules:
- name: Add 'do-not-merge/invalid-pr-format' label for invalid PR titles - name: Add 'do-not-merge/invalid-pr-format' label for invalid PR titles
conditions: conditions:
- or: # branch condition: in this pull request, the changes are based on any branch referenced by BRANCHES
- base=master - or: *BRANCHES
- base~=^2(\.\d+){1,2}$
- or: - or:
- '-title~=^(feat:|enhance:|fix:|test:|doc:|auto:|\[automated\])' - '-title~=^(feat:|enhance:|fix:|test:|doc:|auto:|\[automated\])'
- body=^$ - body=^$
@ -465,9 +430,8 @@ pull_request_rules:
- name: Remove 'do-not-merge/invalid-pr-format' label for valid PRs - name: Remove 'do-not-merge/invalid-pr-format' label for valid PRs
conditions: conditions:
- or: # branch condition: in this pull request, the changes are based on any branch referenced by BRANCHES
- base=master - or: *BRANCHES
- base~=^2(\.\d+){1,2}$
- 'title~=^(feat:|enhance:|fix:|test:|doc:|auto:|\[automated\])' - 'title~=^(feat:|enhance:|fix:|test:|doc:|auto:|\[automated\])'
- '-body=^$' - '-body=^$'
- 'label=do-not-merge/invalid-pr-format' - 'label=do-not-merge/invalid-pr-format'
@ -478,9 +442,8 @@ pull_request_rules:
- name: Label bug fix PRs - name: Label bug fix PRs
conditions: conditions:
- or: # branch condition: in this pull request, the changes are based on any branch referenced by BRANCHES
- base=master - or: *BRANCHES
- base~=^2(\.\d+){1,2}$
- 'title~=^fix:' - 'title~=^fix:'
actions: actions:
label: label:
@ -489,9 +452,8 @@ pull_request_rules:
- name: Label feature PRs - name: Label feature PRs
conditions: conditions:
- or: # branch condition: in this pull request, the changes are based on any branch referenced by BRANCHES
- base=master - or: *BRANCHES
- base~=^2(\.\d+){1,2}$
- 'title~=^feat:' - 'title~=^feat:'
actions: actions:
label: label:
@ -500,9 +462,8 @@ pull_request_rules:
- name: Label enhancement PRs - name: Label enhancement PRs
conditions: conditions:
- or: # branch condition: in this pull request, the changes are based on any branch referenced by BRANCHES
- base=master - or: *BRANCHES
- base~=^2(\.\d+){1,2}$
- 'title~=^enhance:' - 'title~=^enhance:'
actions: actions:
label: label:
@ -511,9 +472,8 @@ pull_request_rules:
- name: Label test PRs - name: Label test PRs
conditions: conditions:
- or: # branch condition: in this pull request, the changes are based on any branch referenced by BRANCHES
- base=master - or: *BRANCHES
- base~=^2(\.\d+){1,2}$
- 'title~=^test:' - 'title~=^test:'
actions: actions:
label: label:
@ -522,9 +482,8 @@ pull_request_rules:
- name: Label doc PRs - name: Label doc PRs
conditions: conditions:
- or: # branch condition: in this pull request, the changes are based on any branch referenced by BRANCHES
- base=master - or: *BRANCHES
- base~=^2(\.\d+){1,2}$
- 'title~=^doc:' - 'title~=^doc:'
actions: actions:
label: label: