forked from milvus-io/milvus
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmergify.yml
More file actions
543 lines (496 loc) · 18.3 KB
/
Copy pathmergify.yml
File metadata and controls
543 lines (496 loc) · 18.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
misc:
- &source_code_files files~=^(?=.*((\.(go|h|cpp)|go.sum|go.mod|CMakeLists.txt|conanfile\.*))).*$
- &no_source_code_files -files~=^(?=.*((\.(go|h|cpp)|go.sum|go.mod|CMakeLists.txt|conanfile\.*))).*$
- when_build_and_test_status_successs: &Build_AND_TEST_STATUS_SUCESS_ON_UBUNTU_20_OR_UBUNTU_22
- 'status-success=Build and test AMD64 Ubuntu 20.04'
- 'status-success=Build and test AMD64 Ubuntu 22.04'
- when_build_and_test_status_failed: &Build_AND_TEST_STATUS_FAILED_ON_UBUNTU_20_OR_UBUNTU_22
- &failed_on_ubuntu_20 'check-failure=Build and test AMD64 Ubuntu 20.04'
- &failed_on_ubuntu_22 'check-failure=Build and test AMD64 Ubuntu 22.04'
- when_go_sdk_status_success: &WHEN_GO_SDK_STATUS_SUCCESS
- 'status-success=go-sdk'
- 'status-success=milvus-sdk-go'
- when_cpp_unit_test_success: &WHEN_CPP_UNIT_TEST_SUCCESS
- 'status-success=cpp-unit-test'
- 'status-success=UT for Cpp'
- when_go_unit_test_success: &WHEN_GO_UNIT_TEST_SUCCESS
- 'status-success=go-unit-test'
- 'status-success=UT for Go'
- when_integration_unit_test_success: &WHEN_INTEGRATION_UNIT_TEST_SUCCESS
- 'status-success=integration-test'
- 'status-success=Integration Test'
- branch: &BRANCHES
# In this pull request, the changes are based on the master branch
- &MASTER_BRANCH base=master
- &23_BRANCH base=2.3
- &24_BRANCH base=2.4
- &25_BRANCH base=2.5
# 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:
# branch condition: in this pull request, the changes are based on any branch referenced by BRANCHES
- or: *BRANCHES
- -status-success=DCO
actions:
label:
remove:
- dco-passed
add:
- needs-dco
comment:
message: |
@{{author}} Thanks for your contribution. Please submit with DCO, see the contributing guide https://github.com/milvus-io/milvus/blob/master/CONTRIBUTING.md#developer-certificate-of-origin-dco.
- name: Add dco-passed label when DCO check passed
conditions:
# branch condition: in this pull request, the changes are based on any branch referenced by BRANCHES
- or: *BRANCHES
- status-success=DCO
actions:
label:
remove:
- needs-dco
add:
- dco-passed
- name: Test passed for code changed on master
conditions:
- *MASTER_BRANCH
- or: *Build_AND_TEST_STATUS_SUCESS_ON_UBUNTU_20_OR_UBUNTU_22
- or: *WHEN_GO_SDK_STATUS_SUCCESS
- or: *WHEN_CPP_UNIT_TEST_SUCCESS
- or: *WHEN_GO_UNIT_TEST_SUCCESS
- or: *WHEN_INTEGRATION_UNIT_TEST_SUCCESS
- 'status-success=Code Checker AMD64 Ubuntu 22.04'
- 'status-success=Code Checker MacOS 13'
# - 'status-success=Code Checker Amazonlinux 2023'
- 'status-success=cpu-e2e'
# - 'status-success=codecov/patch'
# - 'status-success=codecov/project'
actions:
label:
add:
- ci-passed
- name: Test passed for code changed on 2.* branch
conditions:
- *2X_BRANCH
- 'status-success=Code Checker AMD64 Ubuntu 22.04'
- or: *Build_AND_TEST_STATUS_SUCESS_ON_UBUNTU_20_OR_UBUNTU_22
- or: *WHEN_CPP_UNIT_TEST_SUCCESS
- or: *WHEN_GO_UNIT_TEST_SUCCESS
- or: *WHEN_INTEGRATION_UNIT_TEST_SUCCESS
- 'status-success=Code Checker MacOS 13'
# - 'status-success=Code Checker CentOS 7'
- 'status-success=cpu-e2e'
# - 'status-success=codecov/patch'
# - 'status-success=codecov/project'
actions:
label:
add:
- ci-passed
- name: Test passed for tests changed
conditions:
# 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:
label:
add:
- ci-passed
- name: Test passed for docs changed only
conditions:
# branch condition: in this pull request, the changes are based on any branch referenced by BRANCHES
- or: *BRANCHES
- -files~=^(?!.*\.(md)).*$
actions:
label:
add:
- ci-passed
- name: Test passed for non go or c++ code changed
conditions:
# 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:
label:
add:
- ci-passed
- name: Test passed for go unittest code changed-master
conditions:
# 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 13'
# - 'status-success=Code Checker Amazonlinux 2023'
- or: *WHEN_GO_UNIT_TEST_SUCCESS
- or:
- -files~=^(?!pkg\/.*_test\.go).*$
- -files~=^(?!internal\/.*_test\.go).*$
- -files~=^(?!client\/.*_test\.go).*$
actions:
label:
add:
- ci-passed
- 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
- 'status-success=Code Checker AMD64 Ubuntu 22.04'
- 'status-success=Code Checker MacOS 13'
- -files~=^(?!internal\/.*_test\.go).*$
actions:
label:
add:
- ci-passed
- name: Test passed for mergify changed
conditions:
# branch condition: in this pull request, the changes are based on any branch referenced by BRANCHES
- or: *BRANCHES
- -files~=^(?!\.github\/mergify\.yml).*$
actions:
label:
add:
- ci-passed
- name: Test passed for title skip e2e
conditions:
# 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
actions:
label:
add:
- ci-passed
- name: Blocking PR if missing a related issue or doesn't have kind/enhancement label
conditions:
# 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+|$)
- or:
- and:
- label=kind/enhancement
- or:
- label=size/L
- label=size/XL
- label=size/XXL
- label=kind/bug
- label=kind/feature
- -label=kind/doc
- -label=kind/test
- -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:
- and:
# 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+|$)
actions:
label:
remove:
- do-not-merge/missing-related-issue
- name: Blocking PR if missing a related master PR or doesn't have kind/branch-feature label
conditions:
- *2X_BRANCH
- and:
- -body~=pr\:\ \#[0-9]{1,6}(\s+|$)
- -body~=https://github.com/milvus-io/milvus/pull/[0-9]{1,6}(\s+|$)
- -label=kind/branch-feature
- -title~=\[automated\]
actions:
label:
add:
- do-not-merge/missing-related-pr
comment:
message: |
@{{author}} Please associate the related pr of master to the body of your Pull Request. (eg. “pr: #<xyz>”)
- name: Dismiss block label if related pr be added into PR
conditions:
- *2X_BRANCH
- or:
- body~=pr\:\ \#[0-9]{1,6}(\s+|$)
- body~=https://github.com/milvus-io/milvus/pull/[0-9]{1,6}(\s+|$)
- label=kind/branch-feature
actions:
label:
remove:
- do-not-merge/missing-related-pr
- name: Dismiss block label if automated create PR
conditions:
# branch condition: in this pull request, the changes are based on any branch referenced by BRANCHES
- or: *BRANCHES
- title~=\[automated\]
actions:
label:
remove:
- do-not-merge/missing-related-issue
- do-not-merge/missing-related-pr
- name: Test passed for skip e2e-master
conditions:
# 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\]
- or: *WHEN_CPP_UNIT_TEST_SUCCESS
- or: *WHEN_GO_UNIT_TEST_SUCCESS
- or: *WHEN_INTEGRATION_UNIT_TEST_SUCCESS
- 'status-success=Code Checker AMD64 Ubuntu 22.04'
- 'status-success=Code Checker MacOS 13'
# - 'status-success=Code Checker Amazonlinux 2023'
- *source_code_files
actions:
label:
add:
- ci-passed
- name: Test passed for skip e2e - 2.2.*
conditions:
- *2X_BRANCH
- or: *Build_AND_TEST_STATUS_SUCESS_ON_UBUNTU_20_OR_UBUNTU_22
- title~=\[skip e2e\]
- or: *WHEN_CPP_UNIT_TEST_SUCCESS
- or: *WHEN_GO_UNIT_TEST_SUCCESS
- or: *WHEN_INTEGRATION_UNIT_TEST_SUCCESS
- 'status-success=Code Checker MacOS 13'
- *source_code_files
actions:
label:
add:
- ci-passed
- name: Assign the 'lgtm' and 'approved' labels following the successful testing of the 'Update Knowhere Commit'
conditions:
# 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:
label:
add:
- lgtm
- approved
- name: master or 2.5 - Remove ci-passed label when status for code checker or ut is not success
conditions:
# branch condition: in this pull request, the changes are based on any branch referenced by BRANCHES
- or:
- *MASTER_BRANCH
- *25_BRANCH
- label!=manual-pass
- *source_code_files
- or:
- *failed_on_ubuntu_20
- *failed_on_ubuntu_22
- 'status-success!=Code Checker AMD64 Ubuntu 22.04'
- 'status-success!=cpp-unit-test'
- 'status-success!=UT for Go'
- 'status-success!=Integration Test'
- 'status-success!=Code Checker MacOS 13'
# - 'status-success!=Code Checker Amazonlinux 2023'
actions:
label:
remove:
- ci-passed
- name: 2.3 or 2.4 - Remove ci-passed label when status for code checker or ut is not success
conditions:
- or:
- *23_BRANCH
- *24_BRANCH
- label!=manual-pass
- *source_code_files
- or:
- *failed_on_ubuntu_20
- *failed_on_ubuntu_22
# - 'status-success!=Code Checker AMD64 Ubuntu 20.04'
- 'status-success!=UT for Cpp'
- 'status-success!=UT for Go'
- 'status-success!=Integration Test'
- 'status-success!=Code Checker MacOS 13'
# - '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:
# branch condition: in this pull request, the changes are based on any branch referenced by BRANCHES
- or: *BRANCHES
- label!=manual-pass
- -title~=\[skip e2e\]
- files~=^(?!(.*_test\.go|.*\.md)).*$
- 'status-success!=cpu-e2e'
actions:
label:
remove:
- ci-passed
- name: Add comment when jenkins job failed
conditions:
# branch condition: in this pull request, the changes are based on any branch referenced by BRANCHES
- or: *BRANCHES
- 'check-failure=cpu-e2e'
actions:
comment:
message: |
@{{author}} E2e jenkins job failed, comment `/run-cpu-e2e` can trigger the job again.
# when go-sdk check failed, prompt user to rerun go-sdk job
- name: Add comment when go-sdk check failed
conditions:
# branch condition: in this pull request, the changes are based on any branch referenced by BRANCHES
- or: *BRANCHES
- 'check-failure=go-sdk'
actions:
comment:
message: |
@{{author}} go-sdk check failed, comment `rerun go-sdk` can trigger the job again.
# when cpp-unit-test check failed, prompt user to rerun cpp-unit-test job
- name: Add comment when cpp-unit-test check failed
conditions:
# branch condition: in this pull request, the changes are based on any branch referenced by BRANCHES
- or: *BRANCHES
- 'check-failure=cpp-unit-test'
actions:
comment:
message: |
@{{author}} cpp-unit-test check failed, comment `rerun cpp-unit-test` can trigger the job again.
# when go-unit-test check failed, prompt user to rerun go-unit-test job
- name: Add comment when go-unit-test check failed
conditions:
# branch condition: in this pull request, the changes are based on any branch referenced by BRANCHES
- or: *BRANCHES
- 'check-failure=go-unit-test'
actions:
comment:
message: |
@{{author}} go-unit-test check failed, comment `rerun go-unit-test` can trigger the job again.
# when integration-test check failed, prompt user to rerun integration-test job
- name: Add comment when integration-test check failed
conditions:
# branch condition: in this pull request, the changes are based on any branch referenced by BRANCHES
- or: *BRANCHES
- 'check-failure=integration-test'
actions:
comment:
message: |
@{{author}} integration-test check failed, comment `rerun integration-test` can trigger the job again.
- name: Add comment when code checker or ut failed -master
conditions:
# 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'
actions:
comment:
message: |
@{{author}} ut workflow job failed, comment `rerun ut` can trigger the job again.
- name: Add comment when code checker or ut failed -2.2.*
conditions:
- *2X_BRANCH
- or:
# - 'check-failure=Code Checker AMD64 Ubuntu 20.04'
- 'check-failure=Build and test AMD64 Ubuntu 20.04'
actions:
comment:
message: |
@{{author}} ut workflow job failed, comment `rerun ut` can trigger the job again.
- name: Add 'do-not-merge/invalid-pr-format' label for invalid PR titles
conditions:
# 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=^$
actions:
label:
add:
- do-not-merge/invalid-pr-format
comment:
message: |
@{{author}}
**Invalid PR Title Format Detected**
Your PR submission does not adhere to our required standards. To ensure clarity and consistency, please meet the following criteria:
1. **Title Format:** The PR title must begin with one of these prefixes:
- `feat:` for introducing a new feature.
- `fix:` for bug fixes.
- `enhance:` for improvements to existing functionality.
- `test`: for add tests to existing functionality.
- `doc`: for modifying documentation.
- `auto`: for the pull request from bot.
2. **Description Requirement:** The PR must include a non-empty description, detailing the changes and their impact.
**Required Title Structure:**
```
[Type]: [Description of the PR]
```
Where `Type` is one of `feat`, `fix`, `enhance`, `test` or `doc`.
**Example:**
```
enhance: improve search performance significantly
```
Please review and update your PR to comply with these guidelines.
- name: Remove 'do-not-merge/invalid-pr-format' label for valid PRs
conditions:
# 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'
actions:
label:
remove:
- do-not-merge/invalid-pr-format
- name: Label bug fix PRs
conditions:
# branch condition: in this pull request, the changes are based on any branch referenced by BRANCHES
- or: *BRANCHES
- 'title~=^fix:'
actions:
label:
add:
- kind/bug
- name: Label feature PRs
conditions:
# branch condition: in this pull request, the changes are based on any branch referenced by BRANCHES
- or: *BRANCHES
- 'title~=^feat:'
actions:
label:
add:
- kind/feature
- name: Label enhancement PRs
conditions:
# branch condition: in this pull request, the changes are based on any branch referenced by BRANCHES
- or: *BRANCHES
- 'title~=^enhance:'
actions:
label:
add:
- kind/enhancement
- name: Label test PRs
conditions:
# branch condition: in this pull request, the changes are based on any branch referenced by BRANCHES
- or: *BRANCHES
- 'title~=^test:'
actions:
label:
add:
- kind/test
- name: Label doc PRs
conditions:
# branch condition: in this pull request, the changes are based on any branch referenced by BRANCHES
- or: *BRANCHES
- 'title~=^doc:'
actions:
label:
add:
- kind/doc