|
| 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 | + conditions: |
| 50 | + - > |
| 51 | + contains_any_globs(files, [ |
| 52 | + '.editorconfig', |
| 53 | + '.prettierignore', |
| 54 | + '.prettierrc', |
| 55 | + '.stylelintrc.json', |
| 56 | + 'BUILD.bazel', |
| 57 | + 'CHANGELOG_ARCHIVE.md', |
| 58 | + 'CHANGELOG.md', |
| 59 | + 'CODE_OF_CONDUCT.md', |
| 60 | + 'CODE_REVIEWS.md', |
| 61 | + 'CODING_STANDARDS.md', |
| 62 | + 'CONTRIBUTING.md', |
| 63 | + 'DEV_ENVIRONMENT.md', |
| 64 | + 'FAQ.md', |
| 65 | + 'MODULE.bazel.lock', |
| 66 | + 'MODULE.bazel', |
| 67 | + 'package.json', |
| 68 | + 'packages.bzl,', |
| 69 | + 'packages.bzl', |
| 70 | + 'pkg-externals.bzl', |
| 71 | + 'pnpm-lock.yaml', |
| 72 | + 'pnpm-workspace.yaml', |
| 73 | + 'README.md', |
| 74 | + 'SECURITY.md', |
| 75 | + 'tslint.json', |
| 76 | + '.gemini/**/{*,.*}', |
| 77 | + 'docs/**/{*,.*}', |
| 78 | + 'goldens/**/{*,.*}', |
| 79 | + 'guides/**/{*,.*}', |
| 80 | + 'integration/**/{*,.*}', |
| 81 | + 'integration/yarn-pnp-compat/.vscode/**', |
| 82 | + 'integration/yarn-pnp-compat/.yarn/**', |
| 83 | + 'src/**/{*,.*}', |
| 84 | + ]) |
| 85 | + reviewers: |
| 86 | + users: |
| 87 | + - adolgachev |
| 88 | + - crisbeto |
| 89 | + - mmalerba |
| 90 | + - andrewseguin |
| 91 | + - wagnermaciel |
| 92 | + - tjshiu |
| 93 | + - ok7sai |
| 94 | + - ~devversion |
| 95 | + - ~josephperrott |
| 96 | + |
| 97 | + components-infra: |
| 98 | + <<: *defaults |
| 99 | + conditions: |
| 100 | + - > |
| 101 | + contains_any_globs(files, [ |
| 102 | + '.bazel_fix_commands.json', |
| 103 | + '.bazelignore', |
| 104 | + '.bazelrc', |
| 105 | + '.bazelversion', |
| 106 | + '.firebaserc', |
| 107 | + '.git-blame-ignore-revs', |
| 108 | + '.gitignore', |
| 109 | + '.npmrc', |
| 110 | + '.nvmrc', |
| 111 | + '.pullapprove.yml', |
| 112 | + 'firebase.json', |
| 113 | + 'LICENSE', |
| 114 | + 'renovate.json', |
| 115 | + 'tsconfig.json', |
| 116 | + '.github/**/{*,.*}', |
| 117 | + '.husky/**/{*,.*}', |
| 118 | + '.ng-dev/**/{*,.*}', |
| 119 | + '.vscode/**/{*,.*}', |
| 120 | + 'scripts/**/{*,.*}', |
| 121 | + 'test/**/{*,.*}', |
| 122 | + 'tools/**/{*,.*}', |
| 123 | + ]) |
| 124 | + reviewers: |
| 125 | + users: |
| 126 | + - crisbeto |
| 127 | + - devversion |
| 128 | + - andrewseguin |
| 129 | + - josephperrott |
| 130 | + |
| 131 | + # ========================================================= |
| 132 | + # Require review on all PRs |
| 133 | + # |
| 134 | + # All PRs require at least one review. This rule will not |
| 135 | + # request any reviewers, however will require that at least |
| 136 | + # one review is provided before the group is satisfied. |
| 137 | + # ========================================================= |
| 138 | + required-minimum-review: |
| 139 | + reviews: |
| 140 | + request: 0 # Do not request any reviews from the reviewer group |
| 141 | + required: 1 # Require that all PRs have approval from at least one of the users in the group |
| 142 | + author_value: 0 # The author of the PR cannot provide an approval for themself |
| 143 | + reviewers: |
| 144 | + teams: |
| 145 | + # Any member of the team can provide a review to perform the minimum review required |
| 146 | + - team |
0 commit comments