Assign Reviewers by Directory
Automatically assign code reviewers based on directory structure. Optionally, you can substitue require-reviewers
for add-reviewers
to make review from the specified teams and individuals mandatory.
Conditions (all must be true):
- The PR contains changes to JavaScript files inside the
src/ui
directory.
Automation Actions:
- Add a user named
my-teamate
and a team namedmy-organization/ui-team
as reviewers. These should be customized to match your organization. - Post a comment explaining why these reviewers were assigned.
Assign Reviewers by Directory
# -*- mode: yaml -*-
manifest:
version: 1.0
automations:
review_ui:
# Triggered for PRs that contain any changes to JavaScript files inside the `src/ui` directory.
if:
- {{ files | match(regex=r/src\/app\/auth\/.*/) | some}}
# Add a specified user and team as reviewers.
# Customize the reviewers to match your organization
run:
- action: add-reviewers@v1
args:
reviewers: [my-teamate, my-organization/security]
- action: add-comment@v1
args:
comment: |
The Security team has automatically been added for review because this PR contains changes to components inside `/src/app/auth`