Overview #
Configure pre-defined casual, mandatory and suggested reviewers and groups for pull request source and branches. A new pull request will include these reviewers automatically.
- Priority: The first rule that matches a pull request’s source and destination branch will be executed. Place rules with close or direct branch matching expressions at the top of the list and the catch-all rule at the bottom. See more info….
- Branch: Displays Pull Request reviewer configuration for fromBranch >> toBranch. fromBranch is optional.
- Users: This column displays which individual casual and/or mandatory users will be added as reviewers.
- Groups: This column displays which casual and/or mandatory groups will be added as reviewers.
- Suggested: Show number of top committers who will be automatically added to the pull requests.
- Edit reviewer rule.
- Add more reviewer rules.
Add Branch Based Reviewers #
- Destination & source branch
- Casual reviewers
- Mandatory reviewers
- Suggested Reviewers
Add branch-pattern based reviewers #
Just like selecting an existing branch from a dropdown it is also possible to enter branch patterns as source and destination branch for a reviewer configuration. Workzone supports the same Bitbucket Server/Data Center type of pattern syntax for matching branch names (similar to pattern matching in Apache Ant).
These expressions can use the following wild cards:
? | Matches one character (any character except path separators) |
* |
Matches zero or more characters (not including path separators) |
** |
Matches zero or more path segments. |
Examples
* | Matches everything |
PROJECT-* | Matches any branch or tag named PROJECT-*, even in a name space.e.g. refs/heads/PROJECT-1234, refs/heads/stable/PROJECT-new or refs/tags/PROJECT-1.1 |
?.? | Matches any branch or tag of 2 characters separated by a ‘.’.e.g. refs/heads/1.1, refs/heads/stable/2.X or refs/tags/3.1 |
tags/ ortags/** | Matches all tags and any branches with ‘tags’ as a namespace.e.g. refs/heads/stable/tags/some_branch, refs/tags/project-1.1.0 |
heads/**/master | Matches all branches called master.e.g. refs/heads/master, refs/heads/stable/master |
Add Reviewers based on File & Directory Pattern #
If you need more fine-grained control over who gets added as a reviewer you can also configure reviewers based on file and directory patterns. For example, all changes in ‘src/test/**’ that are to be merged via a pull request can be configured as the ‘qa-team’ to be automatically added as reviewers. More info here…
- Add Reviewers – Then click the “Files & Paths” tab
- Enter your Path Pattern
- Select a casual or mandatory reviewer or group.
- If you are adding more than one mandatory users, or a mandatory user group, you can specify what number mandatory approvals are required.
When a pull request with a matching source and target branch is created, the specified individual users and all members of the specified groups will be added to the pull request as reviewers.