-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Expand file tree
/
Copy path.pullapprove.yml
More file actions
106 lines (99 loc) · 3.61 KB
/
.pullapprove.yml
File metadata and controls
106 lines (99 loc) · 3.61 KB
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
version: 3
# Add users here if they're temporarily unavailable.
#availability:
# users_unavailable: []
# Meta field that goes unused by PullApprove to allow for defining aliases to be
# used throughout the config.
meta:
no-groups-above-this-active: &no-groups-above-this-active len(groups.active.exclude("components-team")) == 0
defaults: &defaults
reviews:
# Authors provide their approval implicitly, this approval allows for a reviewer
# from a group not to need a review specifically for an area of the repository
# they own. This is coupled with the `required-minimum-review` group which requires
# that all PRs are reviewed by at least one team member who is not the author of
# the PR.
author_value: 1
# turn on 'draft' support
# https://docs.pullapprove.com/config/github-api-version/
# https://developer.github.com/v3/previews/#draft-pull-requests
github_api_version: 'shadow-cat-preview'
# https://docs.pullapprove.com/config/overrides/
# Note that overrides are processed in order.
overrides:
# For PRs which are still being worked on, either still in draft mode or indicated through WIP in
# title or label, PullApprove stays in a pending state until its ready for review.
- if: "draft or 'WIP' in title or 'PR state: WIP' in labels"
status: pending
explanation: 'Waiting to send reviews as PR is WIP'
# Disable PullApprove on specific PRs by adding the `PullApprove: disable` label
- if: "'PullApprove: disable' in labels"
status: success
explanation: "PullApprove skipped because of 'PullApprove: disable' label"
# If no file matching based groups are active, report this pull request as failing. Most likely,
# the PR author would need to update the PullApprove config, or create new group.
- if: len(groups.active) == 0
status: failure
explanation: 'At least one group must match this PR. Please update an existing review group, or create a new group.'
groups:
components-infra:
<<: *defaults
conditions:
- author not in ["angular-robot"]
- >
contains_any_globs(files, [
'.bazel_fix_commands.json',
'REPO.bazel',
'.bazelrc',
'.bazelversion',
'.firebaserc',
'.git-blame-ignore-revs',
'.gitignore',
'.npmrc',
'.nvmrc',
'.pullapprove.yml',
'firebase.json',
'LICENSE',
'renovate.json',
'tsconfig.json',
'.github/**/{*,.*}',
'.husky/**/{*,.*}',
'.ng-dev/**/{*,.*}',
'.vscode/**/{*,.*}',
'scripts/**/{*,.*}',
'test/**/{*,.*}',
'tools/**/{*,.*}',
])
reviews:
request: 1 # Request at least one review
required: 1 # Require that all PRs have approval from at least one of the users in the group
author_value: 0 # The author of the PR cannot provide an approval for themself
reviewers:
users:
- crisbeto
- devversion
- andrewseguin
- josephperrott
components-team:
<<: *defaults
conditions:
- *no-groups-above-this-active
- >
contains_any_globs(files, [
'**/{.*,*}/**',
'**/{.*,*}',
])
reviews:
request: 2 # Request at least two reviews
required: 1 # Require that all PRs have approval from at least one of the users in the group
author_value: 0 # The author of the PR cannot provide an approval for themself
reviewers:
users:
- adolgachev
- crisbeto
- andrewseguin
- wagnermaciel
- tjshiu
- ok7sai
- ~devversion
- ~josephperrott