-
Notifications
You must be signed in to change notification settings - Fork 92
/
Copy path.mergify.yml
78 lines (69 loc) · 2.09 KB
/
.mergify.yml
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
pull_request_rules:
- name: Automatic squash merge when approved
conditions:
- "#approved-reviews-by>=1"
- "#changes-requested-reviews-by=0"
- "base=gh-pages"
- '-title~=(?i)\bWIP\b'
actions:
merge:
method: squash
commit_message_template: "{{ title }}+{{ body }}"
- name: Add label `DuplicateOrInvalid` when abandoned
conditions:
- "closed"
- "-merged"
actions:
label:
add: ["DuplicateOrInvalid"]
- name: Add label `Area-Content`
conditions:
- 'files~=(?i)^(?!\.|CODE_OF_CONDUCT|docs|LICENSE|README).*\.md$' # To avoid false positives, only matches a few kinds of Markdown files. False negatives can be corrected by humans, but false positives cannot!
actions:
label:
add: ["Area-Content"]
- name: Add label `Area-WebPageDesign`
conditions:
- 'files~=(?i)(^_.*(?<!\.md)$)|(\.(css|js|less|scss)$)' # Not all. Only the most frequently modified files.
actions:
label:
add: ["Area-WebPageDesign"]
- name: Stale PR
conditions:
- "label=Needs-Feedback"
- "-draft"
actions:
assign:
users: ["{{author}}"]
request_reviews:
users: ["TieBaMma"]
- name: Assign the author because it is a draft PR
conditions:
- "draft"
actions:
assign:
users: ["{{author}}"]
- name: Assign the author because its title contains `WIP`
conditions:
- 'title~=(?i)\bWIP\b'
actions:
assign:
users: ["{{author}}"]
- name: Ask to remove `WIP` from title before merge
conditions:
- "#approved-reviews-by>=1"
- "#changes-requested-reviews-by=0"
- "base=gh-pages"
- 'title~=(?i)\bWIP\b'
actions:
comment:
message: |
此 pull request 似乎已经准备就绪,但 title 中仍然有 `WIP` 字样。
如果这是笔误,请修正。
谢谢。
# - name: (Test Env) AutoApprove # For test ONLY! Do not use in production!
# conditions:
# - "label=AutoApprove"
# actions:
# review:
# type: "APPROVE"