forked from stoneatom/stonedb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.mergify.yml
134 lines (122 loc) · 3.51 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
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
queue_rules:
- name: shared_queue
conditions:
- "#approved-reviews-by>=2"
pull_request_rules:
- name: automatic merge of hotfix (high priority)
conditions:
- "#approved-reviews-by>=2"
- label=A-bug
- check-success=stonedb-build
actions:
queue:
name: shared_queue
method: squash
- name: put other pr to merge queue
conditions:
- "#approved-reviews-by>=2"
- label!=A-bug
- check-success=stonedb-build
actions:
queue:
name: shared_queue
method: squash
# Check if PR title contain valid types
- name: Comment PR if title not semantic
conditions:
- author!=Mergify
- 'title!=^(feat|fix|docs|workflow|style|refactor|test|website|chore)(\(.*\))?:'
actions:
comment:
message: |
This pull request's title should follow requirements next. @{{author}} please check it :point_down:.
Valid format:
```
fix(vc): fix sth..... (#3306)
^ ^---------^ ^----^
| | |
| + +-> you issue id.
| |
| +-> Summary in present tense.
|
+-------> Type: feat, fix, docs, workflow, style, refactor, test, website, chore
```
Valid types:
- `feat`: new feature for stonedb
- `fix`: bug fix for stonedb
- `docs`: changes to the documentation
- `workflow`: ci/cd in .github
- `refactor`: refactoring production code, eg. renaming a variable
- `style`: formatting, missing semi colons, etc; no production code change
- `test`: adding missing tests, refactoring tests; no production code change
- `website`
- `chore`: updating grunt tasks etc; no production code change
# if there is a conflict in a approved PR, ping the author.
- name: ping author if there is conflicts
conditions:
- conflict
- "#approved-reviews-by >= 2"
actions:
comment:
message: |
This pull request has merge conflicts, you should resolve it before merged. @{{author}} please update it :)
Try `@mergify update` or update manually.
- name: Welcome new contributor
conditions:
- author!=Mergify
actions:
comment:
message: |
Thanks for the contribution!
I have applied any labels matching special text in your PR Changelog.
Please review the labels and make any necessary changes.
# Assign pr label based of tags
- name: label on New Feature
conditions:
- 'title~=^(feat)(\(.*\))?:'
actions:
label:
add:
- PR-feature
- name: label on Bug Fix
conditions:
- 'title~=^(fix)(\(.*\))?:'
actions:
label:
add:
- PR-bug
- name: label on docs
conditions:
- 'title~=^(docs)(\(.*\))?:'
actions:
label:
add:
- PR-docs
- name: label on style
conditions:
- 'title~=^(style)(\(.*\))?:'
actions:
label:
add:
- PR-style
- name: label on Refactor
conditions:
- 'title~=^(refactor)(\(.*\))?:'
actions:
label:
add:
- PR-refactor
- name: label on test
conditions:
- 'title~=^(test)(\(.*\))?:'
actions:
label:
add:
- PR-testing
- name: label on chore
conditions:
- 'title~=^(chore)(\(.*\))?:'
actions:
label:
add:
- PR-chore