forked from EddieHubCommunity/BioDrop
-
Notifications
You must be signed in to change notification settings - Fork 0
/
reviewpad.yml
102 lines (87 loc) · 2.78 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
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
api-version: reviewpad.com/v3.x
labels:
small:
description: "Pull request with less than 10 changed lines"
color: "294b69"
medium:
description: "Pull request with changed lines between 10 and 30"
color: "a8c3f7"
large:
description: "Pull request with more than 30 changed lines"
color: "8a2138"
rules:
- name: check-for-file-name
description: Checks for the correct author
spec: $hasFileName($sprintf("data/%v.json", [$author()]))
- name: modifies-only-one-file
spec: $fileCount() == 1
- name: check-for-profile-addition
spec: $rule("check-for-file-name") && $rule("modifies-only-one-file")
- name: check-for-linked-issues
spec: $hasLinkedIssues() == false
- name: check-for-status-block
spec: $rule("check-for-profile-addition") == false && $rule("check-for-linked-issues")
workflows:
- name: label-pull-request-with-size
always-run: true
if:
- rule: $size() <= 10
extra-actions:
- $addLabel("small")
- $removeLabels(["medium", "large"])
- rule: $size() > 10 && $size() <= 30
extra-actions:
- $addLabel("medium")
- $removeLabels(["small", "large"])
- rule: $size() > 30
extra-actions:
- $addLabel("large")
- $removeLabels(["small", "medium"])
- name: first-time-contributor
always-run: true
if:
- rule: $pullRequestCountBy($author(), "all") == 1
extra-actions:
- '$commentOnce($sprintf("Welcome @%v! Thank you so much for your first pull request!", [$author()]))'
- rule: $pullRequestCountBy($author(), "all") == 10
extra-actions:
- $addLabel("kudos")
- $info("Kudos for your 10th pull request! You are awesome")
- name: waiting-for-reviewers
always-run: true
if:
- rule: $reviewers() == []
extra-actions:
- '$info("A maintainer will review your pull request soon!")'
- '$addLabel("waiting-for-reviewers")'
- name: add-label-for-chore-profile-addition
always-run: true
if:
- rule: $hasFilePattern("data/**")
then:
- '$addLabel("✍ chore: profile addition")'
- name: chore-profile-addition
description: Automates profile addition
always-run: true
if:
- rule: check-for-profile-addition
then:
- '$addLabel("LGTM")'
- name: add-label-for-tests
always-run: true
if:
- rule: $hasFilePattern("tests/**")
then:
- '$addLabel("tests")'
- name: add-label-for-storybook
always-run: true
if:
- rule: $hasFilePattern("stories/**")
then:
- '$addLabel("storybook")'
# - name: label-pull-request-with-block-status
# always-run: true
# if:
# - rule: check-for-status-block
# then:
# - '$addLabel("🚧 status: blocked")'