Default reviewers allow you to automatically add one or more users as reviewers to pull requests. In addition, you can optionally specify how many of the specified default reviewers must approve a pull request prior to merging to ensure that a minimum level of review occurs.
You may have different roles in your team that should be automatically added to pull requests depending on the nature of the pull request. This can be achieved by assigning default reviewers for a specific repository, a specific branch, using a branch pattern, or with a branch type from the branching model. For example, you might specify a release manager be assigned to all pull requests targeting release branches.
Once assigned in the repository settings, default reviewers will be pre-filled during pull request creation. At that time the set of reviewers can then be adjusted for each pull request.
To add default reviewers for pull requests
- Go to repository settings > Default reviewers.
- Click Add default reviewers.
- For the Source branch and Target branch fields, select either Branch name, Branch pattern, Branching model, or Any branch.
- Branch name - select an existing branch by name.
- Branch pattern - use a branch permission pattern to match multiple branches.
- Branching model - select the branch type to restrict access to. Read more about branching models.
- Any branch - add default reviewers for pull request coming from every branch (for Source branch) to any branch (for Target branch).
- Enter the name(s) of who should be assigned as a reviewer in the Default reviewers field.
- Optional: In the Approvals required field, select how many reviewers must approve pull requests that match this criteria before merging.