forked from IMPranshu/docs-1
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathreviewpad.yml
114 lines (99 loc) · 4.18 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
103
104
105
106
107
108
109
110
111
112
113
114
api-version: reviewpad.com/v3.x
labels:
ship:
color: 76dbbe
show:
color: 2986cc
ask:
color: c90076
groups:
- name: maintainers
kind: developers
spec: '["marcelosousa", "ferreiratiago", "shay2025"]'
rules:
- name: authored-by-maintainer
spec: $isElementOf($author(), $group("maintainers"))
- name: authored-by-external-contributor
spec: '!$isElementOf($author(), $group("maintainers"))'
- name: ship-strategy
spec: $contains($description(), "[x] Ship:") || $isElementOf("ship", $labels())
- name: show-strategy
spec: $contains($description(), "[x] Show:") || $isElementOf("show", $labels())
- name: explicit-ask-strategy
spec: $contains($description(), "[x] Ask:") || $isElementOf("ask", $labels())
- name: ask-strategy
spec: $rule("authored-by-external-contributor") || $rule("explicit-ask-strategy") || (!$rule("ship-strategy") && !$rule("show-strategy"))
workflows:
- name: first-time-issue-contributor
description: Welcome first time issue contributors
on:
- "issue"
always-run: true
if:
- rule: $issueCountBy($author(), "all") == 1
extra-actions:
- $commentOnce($sprintf("Welcome @%v! Thank you so much for your first issue!", [$author()]))
- name: first-time-pr-contributor
description: Welcome first time pull request contributors
on:
- "pull_request"
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()]))
- name: review-process
description: Assign reviewers and assignees based on the author
always-run: true
if:
- rule: authored-by-maintainer
extra-actions:
- $assignReviewer($group("maintainers"), 1, "reviewpad")
- $assignAssignees([$author()])
- rule: authored-by-external-contributor
extra-actions:
- $addLabel("external-contribution")
- $assignReviewer($group("maintainers"), 1, "reviewpad")
- $assignAssignees(["ferreiratiago"])
- name: changes-to-use-cases
description: Verify that use cases are updated properly
always-run: true
if:
- rule: $hasFilePattern("docs/use-cases/**")
then:
- $info("Adding a new use case? Please update the [sidebars.js](/reviewpad/docs/blob/main/sidebars.js)")
- $info("Adding a new use case? Please run the `checker`. You can find more information about the `checker` in [RELEASE.md](/reviewpad/docs/blob/main/RELEASE.md#test-the-reviewpad-configurations)")
- name: conventions
description: Verify that the pull request follows the conventions
always-run: true
if:
- rule: '!$hasLinkedIssues()'
extra-actions:
- $warn("Please make sure that you have linked an issue to the pull request.")
- name: label-ship-show-ask
always-run: true
description: Label the pull request based on the merge strategy
if:
- rule: ship-strategy
extra-actions:
- $addLabel("ship")
- $removeLabels(["ask", "show"])
- $merge("rebase")
- rule: show-strategy
extra-actions:
- $addLabel("show")
- $removeLabels(["ship", "ask"])
- $commentOnce("Please open an issue to review this PR before merging it!")
- rule: ask-strategy
extra-actions:
- $addLabel("ask")
- $removeLabels(["ship", "show"])
- name: changes-built-ins
description: Verify that built-ins are updated properly
always-run: true
if:
- rule: $hasFilePattern("docs/guides/built-ins/actions/**") || $hasFilePattern("docs/guides/built-ins/functions/**")
then:
- $info("Adding a new built-in? Please update the [built-ins.mdx](/reviewpad/docs/blob/main/docs/guides/built-ins/built-ins.mdx)")
- $info("Adding a new built-in? Please add a `caution` section if the built-in is not supported for both pull request and issue")
- $info("Adding a new built-in? Please run the `checker` on the built-in reviewpad examples. You can find more information about the `checker` in [RELEASE.md](/reviewpad/docs/blob/main/RELEASE.md#test-the-reviewpad-configurations)")