forked from angular/angular
-
Notifications
You must be signed in to change notification settings - Fork 2
/
.pullapprove.yml
602 lines (571 loc) · 20.4 KB
/
.pullapprove.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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
####################################################################################
####################################################################################
# Angular Code Ownership #
####################################################################################
####################################################################################
#
# Configuration of code ownership and review approvals for the angular/angular repo.
#
# More info: https://docs.pullapprove.com/
#
# =========================================================
# General rules / philosophy
# =========================================================
#
# - We trust that people do the right thing and won't approve changes they don't feel confident reviewing
# - We enforce that only approved PRs are merged ensuring that unreviewed code isn't accidentally merged
# - We distribute approval rights as much as possible to help us scale better
# - Groups have one or two global approvers groups as fallbacks:
# - @angular/fw-global-approvers: for approving minor changes, large-scale refactorings, and emergency situations.
# - @angular/fw-global-approvers-for-docs-only-changes: for approving minor documentation-only changes that don't require engineering review
# - A small number of file groups have very limited number of reviewers because incorrect changes to the files they guard would have serious consequences (e.g. security, public api)
#
# Configuration nuances:
#
# - This configuration works in conjunction with the protected branch settings that require all changes to be made via pull requests with at least one approval.
# - This approval can come from an appropriate codeowner, or any repo collaborator (person with write access) if the PR is authored by a codeowner.
# - All groups whose pullapprove rules are matched will be required for overall approval.
#
# NOTE:
# In the case of emergency, the repo administrators which include the current angular caretaker
# can bypass this reviewer approval requirement, this is expected as a last resort and to be
# done exceedingly sparingly.
####################################################################################
# GitHub usernames
####################################################################################
# See reviewer list under `required-minimum-review` group. Team member names and
# usernames are managed there.
####################################################################################
# Approval Groups
####################################################################################
# =========================================================
# @angular/framework-global-approvers
# =========================================================
# Used for approving minor changes, large-scale refactorings, and in emergency situations.
#
# alxhub
# jelbourn
# josephperrott
#
# =========================================================
# @angular/framework-global-approvers-for-docs-only-changes
# =========================================================
# Used for approving minor documentation-only changes that don't require engineering review.
version: 3
availability:
users_unavailable: ['atscott', 'devversion']
# Meta field that goes unused by PullApprove to allow for defining aliases to be
# used throughout the config.
meta:
# Note: Because all inactive groups start as pending, we are only checking pending and rejected active groups.
no-groups-above-this-pending: &no-groups-above-this-pending len(groups.active.pending.exclude("required-minimum-review")) == 0
no-groups-above-this-rejected: &no-groups-above-this-rejected len(groups.active.rejected.exclude("required-minimum-review")) == 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.exclude("required-minimum-review").exclude("global-*")) == 0 and len(groups.approved.include("global-*")) == 0
status: failure
explanation: 'At least one group must match this PR. Please update an existing review group, or create a new group.'
# If any global dev-infra approval is given the status should be passing.
- if: len(groups.approved.include("global-dev-infra-approvers")) == 1
status: success
explanation: 'Passing as globally approved by dev-infra'
# If any global docs approval is given the status should be passing.
- if: len(groups.approved.include("global-docs-approvers")) == 1
status: success
explanation: 'Passing as globally approved by docs'
# If any global approval is given the status should be passing.
- if: len(groups.approved.include("global-approvers")) == 1
status: success
explanation: 'Passing as globally approved by global approvers'
groups:
# =========================================================
# Framework: Compiler
# =========================================================
fw-compiler:
<<: *defaults
conditions:
- >
contains_any_globs(files, [
'packages/compiler/**/{*,.*}',
'packages/examples/compiler/**/{*,.*}',
'packages/compiler-cli/**/{*,.*}',
'packages/language-service/**/{*,.*}',
])
reviewers:
users:
- alxhub
- AndrewKushnir
- atscott
- crisbeto
- devversion
- kirjs
- JoostK
# =========================================================
# Framework: General (most code in our packages)
# =========================================================
fw-general:
<<: *defaults
conditions:
- >
contains_any_globs(files.exclude('packages/core/primitives/*'), [
'contributing-docs/public-api-surface.md',
'goldens/circular-deps/packages.json',
'integration/**/{*,.*}',
'modules/**/{*,.*}',
'packages/animations/**/{*,.*}',
'packages/benchpress/**/{*,.*}',
'packages/common/**/{*,.*}',
'packages/core/**/{*,.*}',
'packages/docs/**/{*,.*}',
'packages/elements/**/{*,.*}',
'packages/examples/**/{*,.*}',
'packages/forms/**/{*,.*}',
'packages/localize/**/{*,.*}',
'packages/misc/**/{*,.*}',
'packages/platform-browser/**/{*,.*}',
'packages/platform-browser-dynamic/**/{*,.*}',
'packages/platform-server/**/{*,.*}',
'packages/ssr/**/{*,.*}',
'packages/router/**/{*,.*}',
'packages/service-worker/**/{*,.*}',
'packages/upgrade/**/{*,.*}',
])
reviewers:
users:
- alxhub
- AndrewKushnir
- atscott
- crisbeto
- devversion
- kirjs
- ~jelbourn
- thePunderWoman
- pkozlowski-opensource
# =========================================================
# Framework: Security-sensitive files which require extra review
# =========================================================
fw-security:
<<: *defaults
conditions:
- >
contains_any_globs(files, [
'packages/core/src/sanitization/**/{*,.*}',
'packages/core/test/linker/security_integration_spec.ts',
'packages/compiler/src/schema/**/{*,.*}',
'packages/platform-browser/src/security/**/{*,.*}',
'packages/tsconfig-tsec-base.json',
'packages/tsec-exemption.json',
'tools/tsec.bzl',
'adev/src/content/guide/security.md',
'adev/src/content/examples/security/**/{*,.*}',
])
reviewers:
users:
- alxhub
- jelbourn
- josephperrott
- pkozlowski-opensource
reviews:
request: -1 # request reviews from everyone
required: 2 # require at least 2 approvals
reviewed_for: required
# =========================================================
# Bazel
# =========================================================
bazel:
<<: *defaults
conditions:
- >
contains_any_globs(files, [
'packages/bazel/**/{*,.*}',
])
reviewers:
users:
- devversion
- josephperrott
# =========================================================
# zone.js
# =========================================================
zone-js:
<<: *defaults
conditions:
- >
contains_any_globs(files, [
'packages/zone.js/**/{*,.*}',
])
reviewers:
users:
- JiaLiPassion
# =========================================================
# Tooling: Compiler API shared with Angular CLI
#
# Changing this API might break Angular CLI, so we require
# the CLI team to approve changes here.
# =========================================================
tooling-cli-shared-api:
conditions:
- >
contains_any_globs(files, [
'packages/compiler-cli/private/tooling.ts',
'packages/localize/tools/index.ts'
])
reviewers:
users:
- alan-agius4
- clydin
- dgp1130
reviews:
request: -1 # request reviews from everyone
required: 2 # require at least 2 approvals
reviewed_for: required
# =========================================================
# Documentation content
# =========================================================
angular-dev:
<<: *defaults
conditions:
- >
contains_any_globs(files, [
'adev/**/{*,.*}',
])
reviewers:
users:
- alan-agius4
- alxhub
- AndrewKushnir
- atscott
- bencodezen
- crisbeto
- kirjs
- ~JeanMeche
- jelbourn
- thePunderWoman
- devversion
- josephperrott
- pkozlowski-opensource
- mgechev
- MarkTechson
- kirjs
# =========================================================
# Angular DevTools
# =========================================================
devtools:
<<: *defaults
conditions:
- >
contains_any_globs(files, [
'devtools/**/{*,.*}',
])
reviewers:
users:
- AleksanderBodurri
- devversion
- dgp1130
- josephperrott
- mgechev
- MarkTechson
- ~JeanMeche
# =========================================================
# Dev-infra
# =========================================================
dev-infra:
<<: *defaults
conditions:
- >
contains_any_globs(files.exclude('.pullapprove.yml'), [
'{*,.*}',
'.devcontainer/**/{*,.*}',
'.github/**/{*,.*}',
'.husky/**/{*,.*}',
'.ng-dev/**/{*,.*}',
'.vscode/**/{*,.*}',
'.yarn/**/{*,.*}',
'contributing-docs/*.md',
'contributing-docs/images/**/{*,.*}',
'goldens/{*,.*}',
'goldens/public-api/manage.js',
'modules/{*,.*}',
'packages/{*,.*}',
'packages/examples/test-utils/**/{*,.*}',
'packages/private/**/{*,.*}',
'packages/examples/{*,.*}',
'scripts/**/{*,.*}',
'third_party/**/{*,.*}',
'tools/bazel-repo-patches/**/{*,.*}',
'tools/circular_dependency_test/**/{*,.*}',
'tools/contributing-stats/**/{*,.*}',
'tools/esm-interop/**/{*,.*}',
'tools/gulp-tasks/**/{*,.*}',
'tools/legacy-saucelabs/**/{*,.*}',
'tools/manual_api_docs/**/{*,.*}',
'tools/npm-patches/**/{*,.*}',
'tools/rxjs/**/{*,.*}',
'tools/saucelabs-daemon/**/{*,.*}',
'tools/saucelabs/**/{*,.*}',
'tools/symbol-extractor/**/{*,.*}',
'tools/testing/**/{*,.*}',
'tools/tslint/**/{*,.*}',
'tools/utils/**/{*,.*}',
'tools/yarn/**/{*,.*}',
'tools/{*,.*}',
'**/*.bzl'
])
- author not in ["angular-robot"]
reviewers:
users:
- devversion
- josephperrott
# =========================================================
# Renovate Changes
# =========================================================
renovate-changes:
<<: *defaults
conditions:
- author in ["angular-robot"]
reviewers:
users:
- ~alan-agius4
teams:
- framework-team
# =========================================================
# Public API
# =========================================================
public-api:
<<: *defaults
conditions:
- *no-groups-above-this-pending
- *no-groups-above-this-rejected
- >
contains_any_globs(files.exclude("goldens/public-api/manage.js"), [
'goldens/public-api/**/{*,.*}',
])
reviewers:
users:
- AndrewKushnir
- alxhub
- atscott
- ~jelbourn
- thePunderWoman
- pkozlowski-opensource
- kirjs
- ~iteriani
- ~tbondwilkinson
- ~rahatarmanahmed
reviews:
request: 3 # Request reviews from 3 people
required: 2 # Require that 2 people approve
reviewed_for: required
# ================================================
# Size tracking
# ================================================
size-tracking:
<<: *defaults
conditions:
- *no-groups-above-this-pending
- *no-groups-above-this-rejected
- >
contains_any_globs(files, [
'goldens/size-tracking/**/{*,.*}'
])
reviewers:
users:
- alxhub
- AndrewKushnir
- atscott
- kirjs
- ~jelbourn
- thePunderWoman
- pkozlowski-opensource
reviews:
request: 2 # Request reviews from 2 people
required: 1 # Require that 1 person approve
reviewed_for: required
# ================================================
# Circular dependencies
# ================================================
circular-dependencies:
<<: *defaults
conditions:
- *no-groups-above-this-pending
- *no-groups-above-this-rejected
- >
contains_any_globs(files, [
'goldens/circular-deps/packages.json'
])
reviewers:
users:
- alxhub
- AndrewKushnir
- atscott
- ~jelbourn
- thePunderWoman
- pkozlowski-opensource
- kirjs
####################################################################################
# Special Cases
####################################################################################
# =========================================================
# Code Ownership
# =========================================================
code-ownership:
<<: *defaults
conditions:
- >
contains_any_globs(files, [
'.pullapprove.yml'
])
reviewers:
users:
- alxhub
- AndrewKushnir
- andrewseguin
- dgp1130
- ~jelbourn
- thePunderWoman
- josephperrott
# =========================================================
# Primitives
# =========================================================
# Angular team required reviews
primitives:
<<: *defaults
conditions:
- >
contains_any_globs(files, [
'packages/core/primitives/**/{*,.*}',
])
reviewers:
users:
- pkozlowski-opensource # Pawel Kozlowski
- alxhub # Alex Rickabaugh
- thePunderWoman # Jessica Janiuk
- AndrewKushnir # Andrew Kushnir
- atscott # Andrew Scott
labels:
pending: 'requires: TGP'
approved: 'requires: TGP'
rejected: 'requires: TGP'
# External team required reviews
primitives-shared:
<<: *defaults
conditions:
- >
contains_any_globs(files, [
'packages/core/primitives/**/{*,.*}',
])
reviewers:
users:
- csmick # Cameron Smick
- lannka # Hongfei Ding
- eduhmc # Eduardo Huerta-Mercado
- ehlemur # Edward Lesmes
- ellenyuan # Ellen Yuan
- jesse-good # Jesse Costello-Good
- mturco # Matt Turco
- neonstalwart # Ben Hockey
- iteriani # Thomas Nguyen
- tbondwilkinson # Tom Wilkinson
- rahatarmanahmed # Rahat Ahmed
labels:
pending: 'requires: TGP'
approved: 'requires: TGP'
rejected: 'requires: TGP'
####################################################################################
# Override managed result groups
#
# Groups which are only used to determine the value of an override are managed at
# the bottom of the list as they will set a status on the PR directly, they
# therefore can always be process last without concern.
####################################################################################
# =========================================================
# Global Approvers
#
# All reviews performed for global approvals require using
# the `Reviewed-for:` specifier to set the approval
# specificity as documented at:
# https://docs.pullapprove.com/reviewed-for/
# =========================================================
global-approvers:
type: optional
reviewers:
teams:
- framework-global-approvers
reviews:
request: 0
required: 1
reviewed_for: required
# =========================================================
# Global Approvers For Docs
#
# All reviews performed for global docs approvals require
# using the `Reviewed-for:` specifier to set the approval
# specificity as documented at:
# https://docs.pullapprove.com/reviewed-for/
# =========================================================
global-docs-approvers:
type: optional
reviewers:
teams:
- framework-global-approvers-for-docs-only-changes
reviews:
request: 0
required: 1
reviewed_for: required
# =========================================================
# Global Approvers For Dev-Infra changes
#
# All reviews performed for global dev-infra approvals
# require using the `Reviewed-for:` specifier to set the
# approval specificity as documented at:
# https://docs.pullapprove.com/reviewed-for/
# =========================================================
global-dev-infra-approvers:
type: optional
reviewers:
teams:
- dev-infra-framework
reviews:
request: 0
required: 1
reviewed_for: required
# =========================================================
# Require review on all PRs
#
# All PRs require at least one review. This rule will not
# request any reviewers, however will require that at least
# one review is provided before the group is satisfied.
# =========================================================
required-minimum-review:
reviews:
request: 0 # Do not request any reviews from the reviewer group
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
reviewed_for: ignored # All reviews apply to this group whether noted via Reviewed-for or not
reviewers:
teams:
# Any member of the team can provide a review to perform the minimum review required
- team