-
Notifications
You must be signed in to change notification settings - Fork 1
/
.mergify.yml
100 lines (94 loc) · 3.46 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
# Mergify Rules
# 1. Conventional Commits
# 2. Automatic merge + squash
# 3. Automatic merge
# 4. Remove stale reviews
# 5. Dependabot
pull_request_rules:
# 1. Check title to follow conventional commits
- name: if fails conventional commits
actions:
comment:
message: Title does not follow the guidelines of [Conventional Commits](https://www.conventionalcommits.org). Please adjust title before merge.
conditions:
- author!=dependabot[bot]
- author!=dependabot-preview[bot]
- status-failure=Semantic Pull Request
- -merged
- -closed
# 2. Automatically merge master into branch, build, and squash
- name: automatic merge and squash
actions:
comment:
message: Thanks for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to [allow changes to be pushed to your fork](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/allowing-changes-to-a-pull-request-branch-created-from-a-fork)).
merge:
strict: smart
method: squash
strict_method: merge
commit_message: title+body
delete_head_branch: {}
conditions:
- -title~=(WIP|wip)
- -label~=(work-in-progress|do-not-merge|no-squash)
- -merged
- -closed
- author!=dependabot[bot]
- author!=dependabot-preview[bot]
- "#approved-reviews-by>=1"
- -approved-reviews-by~=author
- "#changes-requested-reviews-by=0"
# 3. Automatically merge master into branch and build
- name: automatic merge
actions:
comment:
message: Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to [allow changes to be pushed to your fork](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/allowing-changes-to-a-pull-request-branch-created-from-a-fork)).
merge:
strict: smart
# Merge instead of squash
method: merge
strict_method: merge
commit_message: title+body
delete_head_branch: {}
conditions:
- -title~=(WIP|wip)
- -label~=(work-in-progress|do-not-merge)
- label~=no-squash
- -merged
- -closed
- author!=dependabot[bot]
- author!=dependabot-preview[bot]
- "#approved-reviews-by>=1"
- -approved-reviews-by~=author
- "#changes-requested-reviews-by=0"
# 4. Dismiss reviews that are stale/merged
- name: remove stale reviews
actions:
dismiss_reviews:
approved: true
changes_requested: true
conditions:
- author!=dependabot[bot]
- author!=dependabot-preview[bot]
- base=master
- -merged
- -closed
# 5. Automatically merge dependabot's blessed PRs
- name: automatically merge Dependabot PRs
actions:
comment:
message: Thanks Dependabot 🙏!
merge:
# 'strict: false' disables Mergify keeping the branch up-to-date from master.
# It's not necessary: Dependabot will do that itself.
# It's not dangerous: GitHub branch protection settings prevent merging stale branches.
strict: false
method: squash
delete_head_branch: {}
conditions:
- -title~=(WIP|wip)
- -label~=(work-in-progress|do-not-merge)
- -merged
- -closed
- author~=dependabot
- "#approved-reviews-by>=1"
- "#changes-requested-reviews-by=0"