-
Notifications
You must be signed in to change notification settings - Fork 44
/
reviewpad.yml
61 lines (54 loc) · 1.72 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
api-version: reviewpad.com/v3.x
labels:
small:
color: "#294b69"
medium:
color: "#a8c3f7"
large:
color: "#8a2138"
workflows:
- name: add-label-with-size
always-run: true
if:
- rule: $size() <= 30
extra-actions:
- '$addLabel("small")'
- rule: $size() > 30 && $size() <= 100
extra-actions:
- '$addLabel("medium")'
- rule: $size() > 100
extra-actions:
- '$addLabel("large")'
- name: first-time-contributor
always-run: true
if:
- '$pullRequestCountBy($author(), "all") == 1'
then:
- '$commentOnce($sprintf("Welcome @%v! Thank you so much for your first pull request!", [$author()]))'
- name: check-conventional-commits
description: Validate that pull requests follow the conventional commits
run:
- if: '$isDraft() == false && $base() == "main"'
then:
- '$commitLint()'
- '$titleLint()'
- name: empty-description
always-run: true
if:
- $description() == ""
then:
- '$warn("The description is empty. Please add more information!")'
- '$fail("Empty description")'
- name: nothing-to-release
always-run: true
if:
- rule: '$base() == "beta" && ! $any($commits(), ($c: String => $startsWith($c, "fix:") )) && ! $any($commits(), ($c: String => $startsWith($c, "feat:") ))'
then:
- '$warn("Release pull request should contain at least one bug fix or feature commit")'
- '$fail("No commits suitable for release found")'
- name: automerge-release-pr
always-run: true
if:
- rule: '$base() == "beta" && $approvalsCount() >= 1 && $haveAllChecksRunCompleted([], "success", ["skipped"])'
then:
- '$merge("merge")'