-
Notifications
You must be signed in to change notification settings - Fork 1
/
reviewpad.yml
80 lines (76 loc) · 3.91 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
extends:
- https://github.com/listendev/.github/blob/main/reviewpad/common.yml
rules:
- name: docs-changes
spec: $hasFileExtensions([".md", ".txt"]) || $matchString("^docs(\([A-Za-z0-9_\/]+\))??:.+$", $title())
- name: ci-changes
spec: $hasFilePattern(".github/**") || $hasFileName(".golangci.yml") || $hasFileName("reviewpad.yml") || $hasFileName(".goreleaser.yml") || $matchString("^ci(\([A-Za-z0-9_\/]+\))??:.+$", $title())
- name: deps-changes
spec: $hasFileName("go.mod") || $hasFileName("go.sum") || $matchString("^build\(deps\)\/.+", $title())
- name: feat-changes
spec: $matchString("^feat(\([A-Za-z0-9_\/]+\))??:.+$", $title())
- name: fix-changes
spec: $matchString("^fix(\([A-Za-z0-9_\/]+\))??:.+$", $title())
- name: breaking-changes
spec: $matchString("^([A-Za-z0-9_]+)??(\([A-Za-z0-9_\/]+\))??!:.+$", $title())
- name: exclude-changes
spec: $matchString("^(chore|refactor|revert|perf|test)(\([A-Za-z0-9_\/]+\))??:.+$", $title())
- name: by-bot
spec: $matchString("^(dependabot|github-actions).*$", $author())
- name: build-changes
spec: $hasFilePattern("make/**") || $matchString("^build(\([A-Za-z0-9_\/]+\))??:.+$", $title()) || $matchString("^build\/.+", $head())
groups:
- name: ignore-patterns
spec: '["go.sum"]'
# For more details see https://docs.reviewpad.com/guides/syntax#workflow.
workflows:
# This workflow labels pull requests based on the pull request change type.
# This helps pick pull requests based on their change type.
- name: pulls-labelling
description: Label pull requests
always-run: true
if:
# Label pull requests with `docs` if they only modify markdown or txt files, or if the branch starts with the `docs/` prefix, or if the title starts with the `docs:` prefix
- rule: docs-changes
extra-actions:
- $addLabel("documentation")
# Label pull requests with `ci` if they modify files in the .github/ directory, or if the branch starts with the `ci/` prefix, or if the title starts with the `ci:` prefix
- rule: ci-changes
extra-actions:
- $addLabel("ci")
# Label pull requests with `dependencies` if they only modify `package.json` and `package.lock` files.
- rule: deps-changes
extra-actions:
- $addLabel("dependencies")
# Label pull requests with `build` they modify files in the make/ directory, or if the branch starts with the `build/` prefix, or if the title starts with the `build:` prefix
- rule: build-changes
extra-actions:
- $addLabel("build")
# Label pull requests with `enhancement` if the branch starts with (new|feat[ure]/) or the title starts with the feat prefix
- rule: feat-changes
extra-actions:
- $addLabel("enhancement")
# Label pull requests with `bug` if the branch starts with the `fix/` prefix, or with the `bug/` prefix, or if the title starts with the `fix:` prefix
- rule: fix-changes
extra-actions:
- $addLabel("bug")
# Label pull requests with `breaking-change` if the title contains any prefix followed by "!"
- rule: breaking-changes
extra-actions:
- $addLabel("breaking-change")
# Label pull requests with `no-releasenotes` if the branch or the title starts with one of the excluded prefixes (chore|refactor|revert|perf|test)
- rule: exclude-changes
extra-actions:
- $addLabel("no-releasenotes")
# Label pull requests with `no-releasenotes` if their author is...
- rule: by-bot
extra-actions:
- $addLabel("no-releasenotes")
# Label pull requests with `needs-review` if they are waiting for review
- rule: $isWaitingForReview()
extra-actions:
- $addLabel("needs-review")
# Unlabel pull requests with `needs-review` when they got a review
- rule: $isWaitingForReview() == false
extra-actions:
- $removeLabel("needs-review")