Skip to content

Commit 8509a86

Browse files
committed
build: set up PullApprove for reviews
Replaces Github's code review assignments with PullApprove which is a bit more configurable and which can help reduce noise for the team.
1 parent cd22ab6 commit 8509a86

File tree

4 files changed

+95
-101
lines changed

4 files changed

+95
-101
lines changed

.github/CODEOWNERS

Lines changed: 0 additions & 14 deletions
This file was deleted.

.pullapprove.yml

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
version: 3
2+
3+
# Add users here if they're temporarily unavailable.
4+
#availability:
5+
# users_unavailable: []
6+
7+
# Meta field that goes unused by PullApprove to allow for defining aliases to be
8+
# used throughout the config.
9+
meta:
10+
# Note: Because all inactive groups start as pending, we are only checking pending and rejected active groups.
11+
no-groups-above-this-pending: &no-groups-above-this-pending len(groups.active.pending.exclude("required-minimum-review")) == 0
12+
no-groups-above-this-rejected: &no-groups-above-this-rejected len(groups.active.rejected.exclude("required-minimum-review")) == 0
13+
14+
defaults: &defaults
15+
reviews:
16+
# Authors provide their approval implicitly, this approval allows for a reviewer
17+
# from a group not to need a review specifically for an area of the repository
18+
# they own. This is coupled with the `required-minimum-review` group which requires
19+
# that all PRs are reviewed by at least one team member who is not the author of
20+
# the PR.
21+
author_value: 1
22+
23+
# turn on 'draft' support
24+
# https://docs.pullapprove.com/config/github-api-version/
25+
# https://developer.github.com/v3/previews/#draft-pull-requests
26+
github_api_version: 'shadow-cat-preview'
27+
28+
# https://docs.pullapprove.com/config/overrides/
29+
# Note that overrides are processed in order.
30+
overrides:
31+
# For PRs which are still being worked on, either still in draft mode or indicated through WIP in
32+
# title or label, PullApprove stays in a pending state until its ready for review.
33+
- if: "draft or 'WIP' in title or 'PR state: WIP' in labels"
34+
status: pending
35+
explanation: 'Waiting to send reviews as PR is WIP'
36+
# Disable PullApprove on specific PRs by adding the `PullApprove: disable` label
37+
- if: "'PullApprove: disable' in labels"
38+
status: success
39+
explanation: "PullApprove skipped because of 'PullApprove: disable' label"
40+
# If no file matching based groups are active, report this pull request as failing. Most likely,
41+
# the PR author would need to update the PullApprove config, or create new group.
42+
- if: len(groups.active) == 0
43+
status: failure
44+
explanation: 'At least one group must match this PR. Please update an existing review group, or create a new group.'
45+
46+
groups:
47+
components-team:
48+
<<: *defaults
49+
reviewers:
50+
users:
51+
- adolgachev
52+
- crisbeto
53+
- mmalerba
54+
- andrewseguin
55+
- wagnermaciel
56+
- tjshiu
57+
- ok7sai
58+
59+
components-infra:
60+
<<: *defaults
61+
conditions:
62+
- >
63+
contains_any_globs(files, [
64+
'.pullapprove.yml',
65+
'packages/.github/**/{*,.*}',
66+
'packages/.husky/**/{*,.*}',
67+
'packages/.ng-dev/**/{*,.*}',
68+
'packages/.vscode/**/{*,.*}',
69+
'packages/scripts/**/{*,.*}',
70+
'packages/test/**/{*,.*}',
71+
'packages/tools/**/{*,.*}',
72+
])
73+
reviewers:
74+
users:
75+
- crisbeto
76+
- devversion
77+
- andrewseguin
78+
- josephperrott
79+
80+
# =========================================================
81+
# Require review on all PRs
82+
#
83+
# All PRs require at least one review. This rule will not
84+
# request any reviewers, however will require that at least
85+
# one review is provided before the group is satisfied.
86+
# =========================================================
87+
required-minimum-review:
88+
reviews:
89+
request: 0 # Do not request any reviews from the reviewer group
90+
required: 1 # Require that all PRs have approval from at least one of the users in the group
91+
author_value: 0 # The author of the PR cannot provide an approval for themself
92+
reviewers:
93+
teams:
94+
# Any member of the team can provide a review to perform the minimum review required
95+
- team

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@
3535
"check-package-externals": "node --no-warnings=ExperimentalWarning --loader ts-node/esm/transpile-only scripts/check-package-externals.mts",
3636
"format": "pnpm -s ng-dev format changed",
3737
"cherry-pick-patch": "ts-node --project tools/cherry-pick-patch/tsconfig.json tools/cherry-pick-patch/cherry-pick-patch.ts",
38-
"ownerslint": "node --no-warnings=ExperimentalWarning --loader ts-node/esm/transpile-only scripts/ownerslint.mts",
3938
"detect-component-id-collisions": "node --no-warnings=ExperimentalWarning --loader ts-node/esm/transpile-only scripts/detect-component-id-collisions.mts",
4039
"tslint": "tslint -c tslint.json --project ./tsconfig.json",
4140
"stylelint": "stylelint \"(src|docs)/**/*.+(css|scss)\" --config .stylelintrc.json",

scripts/ownerslint.mts

Lines changed: 0 additions & 86 deletions
This file was deleted.

0 commit comments

Comments
 (0)