-
Notifications
You must be signed in to change notification settings - Fork 5
/
reviewpad.yml
57 lines (49 loc) · 1.54 KB
/
reviewpad.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
dictionaries:
- name: Label per file path
description: Labels to apply based on the path of the touched files
spec:
'**/app/**': '"app"'
'**/web/**': '"web"'
'**/blog/**': '"blog"'
rules:
- name: Open PR state
spec: '!$isDraft() && $getState() == "open"'
- name: First run state
spec: $getEventType() == "opened" && $rule("Open PR state")
workflows:
- name: Assign author
run:
- if: $rule("First run state")
then: $addAssignees([$getAuthor()])
- name: Add labels to PR
run:
- if: $rule("Open PR state")
then:
- forEach:
key: $filePattern
value: $label
in: $dictionary("Label per file path")
do:
- if: $containsFilePattern($filePattern)
then:
- $addLabel($label)
- name: Request review from maintainers
run:
- if: $rule("First run state")
then: $addReviewers($getTeamMembers("shuriken"))
- name: Base message and summary
run:
- if: $rule("First run state")
then:
- if: $countUserPullRequests($getAuthor()) == 1
then: $info("Thanks for your first contribution!")
else: $info("Thanks for your contribution!")
- $warn("Please make sure the CI is green before merging.")
- $summarize()
- name: Enforce conventional commits
run:
- if: $rule("Open PR state")
then: $titleLint()
- name: Enforce head branch deletion
always-run: true
run: $deleteHeadBranch()