This repository has been archived by the owner on Jun 12, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
reviewpad.yml
75 lines (66 loc) · 1.67 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
api-version: reviewpad.com/v3.x
labels:
size-s:
name: "size/s"
color: "#294b69"
size-m:
name: "size/m"
color: "#a8c3f7"
size-l:
name: "size/l"
color: "#8a2138"
conflicts:
color: "#1c2131"
rules:
- name: more-than-one-approval
spec: '$length($reviewers()) > 0 && $all($reviewers(), ($reviewer: String => $reviewerStatus($reviewer) == "APPROVED"))'
workflows:
- name: label-pull-request-with-size
always-run: true
if:
- rule: $size() <= 25
extra-actions:
- $addLabel("size-s")
- rule: $size() > 25 && $size() <= 100
extra-actions:
- $addLabel("size-m")
- rule: $size() > 100
extra-actions:
- $addLabel("size-l")
- name: empty-description
always-run: true
if:
- $description() == ""
then:
- $error("The description is empty. Please add more information!")
- name: review-tests
always-run: true
if:
- $hasFilePattern("src/*_test.go")
then:
- $info("Pull requests which modify tests need an explicit approval")
- $assignRandomReviewer()
- name: validate-commits
always-run: true
if:
- 'true'
then:
- $commitLint()
- name: modified-code-contains-lib
always-run: true
if:
- $hasCodePattern("rand.")
then:
- $info("This pull request contains calls to random external library")
- name: label-pull-requests-with-git-conflicts
always-run: true
if:
- $hasGitConflicts()
then:
- '$addLabel("conflicts")'
- name: auto-merge-approved-pull-requests
always-run: true
if:
- rule: more-than-one-approval
then:
- $merge("rebase")