|
| 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 | + no-groups-above-this-active: &no-groups-above-this-active len(groups.active.exclude("components-team")) == 0 |
| 11 | + |
| 12 | + defaults: &defaults |
| 13 | + reviews: |
| 14 | + # Authors provide their approval implicitly, this approval allows for a reviewer |
| 15 | + # from a group not to need a review specifically for an area of the repository |
| 16 | + # they own. This is coupled with the `required-minimum-review` group which requires |
| 17 | + # that all PRs are reviewed by at least one team member who is not the author of |
| 18 | + # the PR. |
| 19 | + author_value: 1 |
| 20 | + |
| 21 | +# turn on 'draft' support |
| 22 | +# https://docs.pullapprove.com/config/github-api-version/ |
| 23 | +# https://developer.github.com/v3/previews/#draft-pull-requests |
| 24 | +github_api_version: 'shadow-cat-preview' |
| 25 | + |
| 26 | +# https://docs.pullapprove.com/config/overrides/ |
| 27 | +# Note that overrides are processed in order. |
| 28 | +overrides: |
| 29 | + # For PRs which are still being worked on, either still in draft mode or indicated through WIP in |
| 30 | + # title or label, PullApprove stays in a pending state until its ready for review. |
| 31 | + - if: "draft or 'WIP' in title or 'PR state: WIP' in labels" |
| 32 | + status: pending |
| 33 | + explanation: 'Waiting to send reviews as PR is WIP' |
| 34 | + # Disable PullApprove on specific PRs by adding the `PullApprove: disable` label |
| 35 | + - if: "'PullApprove: disable' in labels" |
| 36 | + status: success |
| 37 | + explanation: "PullApprove skipped because of 'PullApprove: disable' label" |
| 38 | + # If no file matching based groups are active, report this pull request as failing. Most likely, |
| 39 | + # the PR author would need to update the PullApprove config, or create new group. |
| 40 | + - if: len(groups.active) == 0 |
| 41 | + status: failure |
| 42 | + explanation: 'At least one group must match this PR. Please update an existing review group, or create a new group.' |
| 43 | + |
| 44 | +groups: |
| 45 | + components-infra: |
| 46 | + <<: *defaults |
| 47 | + conditions: |
| 48 | + - author not in ["angular-robot"] |
| 49 | + - > |
| 50 | + contains_any_globs(files, [ |
| 51 | + '.bazel_fix_commands.json', |
| 52 | + '.bazelignore', |
| 53 | + '.bazelrc', |
| 54 | + '.bazelversion', |
| 55 | + '.firebaserc', |
| 56 | + '.git-blame-ignore-revs', |
| 57 | + '.gitignore', |
| 58 | + '.npmrc', |
| 59 | + '.nvmrc', |
| 60 | + '.pullapprove.yml', |
| 61 | + 'firebase.json', |
| 62 | + 'LICENSE', |
| 63 | + 'renovate.json', |
| 64 | + 'tsconfig.json', |
| 65 | + '.github/**/{*,.*}', |
| 66 | + '.husky/**/{*,.*}', |
| 67 | + '.ng-dev/**/{*,.*}', |
| 68 | + '.vscode/**/{*,.*}', |
| 69 | + 'scripts/**/{*,.*}', |
| 70 | + 'test/**/{*,.*}', |
| 71 | + 'tools/**/{*,.*}', |
| 72 | + ]) |
| 73 | + reviews: |
| 74 | + request: 1 # Request at least one review |
| 75 | + required: 1 # Require that all PRs have approval from at least one of the users in the group |
| 76 | + author_value: 0 # The author of the PR cannot provide an approval for themself |
| 77 | + reviewers: |
| 78 | + users: |
| 79 | + - crisbeto |
| 80 | + - devversion |
| 81 | + - andrewseguin |
| 82 | + - josephperrott |
| 83 | + |
| 84 | + components-team: |
| 85 | + <<: *defaults |
| 86 | + conditions: |
| 87 | + - *no-groups-above-this-active |
| 88 | + - > |
| 89 | + contains_any_globs(files, [ |
| 90 | + '**/{.*,*}/**', |
| 91 | + '**/{.*,*}', |
| 92 | + ]) |
| 93 | + reviews: |
| 94 | + request: 2 # Request at least two reviews |
| 95 | + required: 1 # Require that all PRs have approval from at least one of the users in the group |
| 96 | + author_value: 0 # The author of the PR cannot provide an approval for themself |
| 97 | + reviewers: |
| 98 | + users: |
| 99 | + - adolgachev |
| 100 | + - crisbeto |
| 101 | + - mmalerba |
| 102 | + - andrewseguin |
| 103 | + - wagnermaciel |
| 104 | + - tjshiu |
| 105 | + - ok7sai |
| 106 | + - ~devversion |
| 107 | + - ~josephperrott |
0 commit comments