diff --git a/.github/mergify.yml b/.github/mergify.yml index 4ba6eb7796285..d3d8d3b8e5802 100644 --- a/.github/mergify.yml +++ b/.github/mergify.yml @@ -10,17 +10,17 @@ misc: - when_go_sdk_status_success: &WHEN_GO_SDK_STATUS_SUCCESS - 'status-success=go-sdk' - '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 + # In this pull request, the changes are based on the 2.x(or 2.x.x) branch - &2X_BRANCH base~=^2(\.\d+){1,2}$ pull_request_rules: - name: Add needs-dco label when DCO check failed conditions: - - or: - - base=master - - base=sql_beta - - base~=^2(\.\d+){1,2}$ + # branch condition: in this pull request, the changes are based on any branch referenced by BRANCHES + - or: *BRANCHES - -status-success=DCO actions: label: @@ -34,10 +34,8 @@ pull_request_rules: - name: Add dco-passed label when DCO check passed conditions: - - or: - - base=master - - base~=^2(\.\d+){1,2}$ - - base=sql_beta + # branch condition: in this pull request, the changes are based on any branch referenced by BRANCHES + - or: *BRANCHES - status-success=DCO actions: label: @@ -84,10 +82,8 @@ pull_request_rules: - name: Test passed for tests changed conditions: - - or: - - base=master - - base=sql_beta - - base~=^2(\.\d+){1,2}$ + # branch condition: in this pull request, the changes are based on any branch referenced by BRANCHES + - or: *BRANCHES - -files~=^(?!tests\/python_client).+ - 'status-success=cpu-e2e' actions: @@ -97,10 +93,8 @@ pull_request_rules: - name: Test passed for docs changed only conditions: - - or: - - base=master - - base=sql_beta - - base~=^2(\.\d+){1,2}$ + # branch condition: in this pull request, the changes are based on any branch referenced by BRANCHES + - or: *BRANCHES - -files~=^(?!.*\.(md)).*$ actions: label: @@ -109,10 +103,8 @@ pull_request_rules: - name: Test passed for non go or c++ code changed conditions: - - or: - - base=master - - base=sql_beta - - base~=^2(\.\d+){1,2}$ + # branch condition: in this pull request, the changes are based on any branch referenced by BRANCHES + - or: *BRANCHES - 'status-success=cpu-e2e' - *no_source_code_files actions: @@ -122,10 +114,8 @@ pull_request_rules: - name: Test passed for go unittest code changed-master conditions: - - or: - - base=master - - base=sql_beta - - base~=^2(\.\d+){1,2}$ + # branch condition: in this pull request, the changes are based on any branch referenced by BRANCHES + - or: *BRANCHES - or: *Build_AND_TEST_STATUS_SUCESS_ON_UBUNTU_20_OR_UBUNTU_22 - 'status-success=Code Checker AMD64 Ubuntu 22.04' # - 'status-success=Code Checker MacOS 12' @@ -141,8 +131,8 @@ pull_request_rules: - name: Test passed for go unittest code changed -2.2.* conditions: + - *2X_BRANCH - 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 MacOS 12' - -files~=^(?!internal\/.*_test\.go).*$ @@ -153,10 +143,8 @@ pull_request_rules: - name: Test passed for mergify changed conditions: - - or: - - base=master - - base=sql_beta - - base~=^2(\.\d+){1,2}$ + # branch condition: in this pull request, the changes are based on any branch referenced by BRANCHES + - or: *BRANCHES - -files~=^(?!\.github\/mergify\.yml).*$ actions: label: @@ -165,10 +153,8 @@ pull_request_rules: - name: Test passed for title skip e2e conditions: - - or: - - base=master - - base=sql_beta - - base~=^2(\.\d+){1,2}$ + # branch condition: in this pull request, the changes are based on any branch referenced by BRANCHES + - or: *BRANCHES - title~=\[skip e2e\] - label=kind/enhancement - *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 conditions: - - or: - - base=master - - base=sql_beta - - base~=^2(\.\d+){1,2}$ + # branch condition: in this pull request, the changes are based on any branch referenced by BRANCHES + - or: *BRANCHES - and: - -body~=\#[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 conditions: - and: - - or: - - base=master - - base=sql_beta - - base~=^2(\.\d+){1,2}$ + # branch condition: in this pull request, the changes are based on any branch referenced by BRANCHES + - or: *BRANCHES - or: - body~=\#[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 conditions: - - base~=^2(\.\d+){1,2}$ + - *2X_BRANCH - and: - -body~=pr\:\ \#[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 conditions: - - base~=^2(\.\d+){1,2}$ + - *2X_BRANCH - or: - body~=pr\:\ \#[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 conditions: - - or: - - base=master - - base=sql_beta - - base~=^2(\.\d+){1,2}$ + # branch condition: in this pull request, the changes are based on any branch referenced by BRANCHES + - or: *BRANCHES - title~=\[automated\] actions: label: @@ -265,10 +245,8 @@ pull_request_rules: - name: Test passed for skip e2e-master conditions: - - or: - - base=master - - base=sql_beta - - base~=^2(\.\d+){1,2}$ + # branch condition: in this pull request, the changes are based on any branch referenced by BRANCHES + - or: *BRANCHES - or: *Build_AND_TEST_STATUS_SUCESS_ON_UBUNTU_20_OR_UBUNTU_22 - title~=\[skip e2e\] - 'status-success=Code Checker AMD64 Ubuntu 22.04' @@ -285,8 +263,8 @@ pull_request_rules: - name: Test passed for skip e2e - 2.2.* conditions: + - *2X_BRANCH - or: *Build_AND_TEST_STATUS_SUCESS_ON_UBUNTU_20_OR_UBUNTU_22 - - base~=^2\.2\.\d+$ - title~=\[skip e2e\] # - 'status-success=Code Checker AMD64 Ubuntu 20.04' - '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' conditions: - - or: - - base=master - - base=sql_beta - - base~=^2(\.\d+){1,2}$ + # branch condition: in this pull request, the changes are based on any branch referenced by BRANCHES + - or: *BRANCHES - 'title~=Update Knowhere Commit' - label=ci-passed actions: @@ -315,11 +291,9 @@ pull_request_rules: - name: Remove ci-passed label when status for code checker or ut is not success-master conditions: + # branch condition: in this pull request, the changes are based on any branch referenced by BRANCHES + - or: *BRANCHES - label!=manual-pass - - or: - - base=master - - base=sql_beta - - base~=^2(\.\d+){1,2}$ - *source_code_files - or: - *failed_on_ubuntu_20 @@ -356,11 +330,9 @@ pull_request_rules: - name: Remove ci-passed label when status for jenkins job is not success conditions: + # branch condition: in this pull request, the changes are based on any branch referenced by BRANCHES + - or: *BRANCHES - label!=manual-pass - - or: - - base=master - - base=sql_beta - - base~=^2(\.\d+){1,2}$ - -title~=\[skip e2e\] - files~=^(?!(.*_test\.go|.*\.md)).*$ - 'status-success!=cpu-e2e' @@ -371,10 +343,8 @@ pull_request_rules: - name: Add comment when jenkins job failed conditions: - - or: - - base=master - - base=sql_beta - - base~=^2(\.\d+){1,2}$ + # branch condition: in this pull request, the changes are based on any branch referenced by BRANCHES + - or: *BRANCHES - 'check-failure=cpu-e2e' actions: comment: @@ -383,10 +353,8 @@ pull_request_rules: - name: Add comment when go-sdk check failed conditions: - - or: - - base=master - - base=sql_beta - - base~=^2(\.\d+){1,2}$ + # branch condition: in this pull request, the changes are based on any branch referenced by BRANCHES + - or: *BRANCHES - 'check-failure=go-sdk' actions: comment: @@ -395,10 +363,8 @@ pull_request_rules: - name: Add comment when code checker or ut failed -master conditions: - - or: - - base=master - - base~=^2(\.\d+){1,2}$ - - base=sql_beta + # branch condition: in this pull request, the changes are based on any branch referenced by BRANCHES + - or: *BRANCHES - or: # - 'check-failure=Code Checker 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.* conditions: - - base~=^2\.2\.\d+$ + - *2X_BRANCH - or: # - 'check-failure=Code Checker 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 conditions: - - or: - - base=master - - base~=^2(\.\d+){1,2}$ + # branch condition: in this pull request, the changes are based on any branch referenced by BRANCHES + - or: *BRANCHES - or: - '-title~=^(feat:|enhance:|fix:|test:|doc:|auto:|\[automated\])' - body=^$ @@ -465,9 +430,8 @@ pull_request_rules: - name: Remove 'do-not-merge/invalid-pr-format' label for valid PRs conditions: - - or: - - base=master - - base~=^2(\.\d+){1,2}$ + # branch condition: in this pull request, the changes are based on any branch referenced by BRANCHES + - or: *BRANCHES - 'title~=^(feat:|enhance:|fix:|test:|doc:|auto:|\[automated\])' - '-body=^$' - 'label=do-not-merge/invalid-pr-format' @@ -478,9 +442,8 @@ pull_request_rules: - name: Label bug fix PRs conditions: - - or: - - base=master - - base~=^2(\.\d+){1,2}$ + # branch condition: in this pull request, the changes are based on any branch referenced by BRANCHES + - or: *BRANCHES - 'title~=^fix:' actions: label: @@ -489,9 +452,8 @@ pull_request_rules: - name: Label feature PRs conditions: - - or: - - base=master - - base~=^2(\.\d+){1,2}$ + # branch condition: in this pull request, the changes are based on any branch referenced by BRANCHES + - or: *BRANCHES - 'title~=^feat:' actions: label: @@ -500,9 +462,8 @@ pull_request_rules: - name: Label enhancement PRs conditions: - - or: - - base=master - - base~=^2(\.\d+){1,2}$ + # branch condition: in this pull request, the changes are based on any branch referenced by BRANCHES + - or: *BRANCHES - 'title~=^enhance:' actions: label: @@ -511,9 +472,8 @@ pull_request_rules: - name: Label test PRs conditions: - - or: - - base=master - - base~=^2(\.\d+){1,2}$ + # branch condition: in this pull request, the changes are based on any branch referenced by BRANCHES + - or: *BRANCHES - 'title~=^test:' actions: label: @@ -522,9 +482,8 @@ pull_request_rules: - name: Label doc PRs conditions: - - or: - - base=master - - base~=^2(\.\d+){1,2}$ + # branch condition: in this pull request, the changes are based on any branch referenced by BRANCHES + - or: *BRANCHES - 'title~=^doc:' actions: label: