Default Reviewer Resource¶
Name | default_reviewer |
URI | /api/default-reviewers/{default_reviewer_id}/ |
Description | Provides information on default reviewers for review requests. Review Board will apply any default reviewers that match the repository and any file path in an uploaded diff for new and updated review requests. A default reviewer entry can list multiple users and groups. This is useful when different groups own different parts of a codebase. Adding DefaultReviewer entries ensures that the right people will always see the review request and discussions. Default reviewers take a regular expression for the file path matching, making it flexible. As a tip, specifying .* for the regular expression would have this default reviewer applied to every review request on the matched repositories. |
HTTP Methods | |
Parent Resource | Default Reviewer List Resource |
Child Resources | None |
Anonymous Access | Yes, if anonymous site access is enabled |
Fields¶
Field | Type | Description |
---|---|---|
file_regex | String | The regular expression that is used to match files uploaded in a diff. |
groups | String | A comma-separated list of group names that this default reviewer applies to matched review requests. |
id | Integer | The numeric ID of the default reviewer. |
name | String | The descriptive name of the entry. |
repositories | String | A comma-separated list of repository IDs that this default reviewer will match against. |
users | String | A comma-separated list of usernames that this default reviewer applies to matched review requests. |
Links¶
Name | Method | Resource |
---|---|---|
delete | DELETE | Default Reviewer Resource |
self | GET | Default Reviewer Resource |
update | PUT | Default Reviewer Resource |
HTTP DELETE¶
Deletes the default reviewer entry.
This will not remove any reviewers from any review requests. It will only prevent these default reviewer rules from being applied to any new review requests or updates.
HTTP GET¶
Retrieves information on a particular default reviewer.
HTTP PUT¶
Updates an existing default reviewer entry.
If the list of repositories is updated with a blank entry, then the default reviewer will apply to review requests on all repositories.
Request Parameters¶
Field | Type | Description |
---|---|---|
file_regex (optional) | String | The regular expression used to match file paths in newly uploaded diffs. |
groups (optional) | String | A comma-separated list of group names. |
name (optional) | String | The name of the default reviewer entry. |
repositories (optional) | String | A comma-separated list of repository IDs. |
users (optional) | String | A comma-separated list of usernames. |
Examples¶
application/vnd.reviewboard.org.default-reviewer+json¶
{
"default_reviewer": {
"file_regex": "/docs/.*",
"groups": [
{
"href": "http://reviews.example.com/api/groups/docs/",
"method": "GET",
"title": "docs"
}
],
"id": 1,
"links": {
"delete": {
"href": "http://reviews.example.com/api/default-reviewers/1/",
"method": "DELETE"
},
"self": {
"href": "http://reviews.example.com/api/default-reviewers/1/",
"method": "GET"
},
"update": {
"href": "http://reviews.example.com/api/default-reviewers/1/",
"method": "PUT"
}
},
"name": "docs-team",
"repositories": [
{
"href": "http://reviews.example.com/api/repositories/1/",
"method": "GET",
"title": "Review Board SVN"
}
],
"users": [
{
"href": "http://reviews.example.com/api/users/doc/",
"method": "GET",
"title": "doc"
}
]
},
"stat": "ok"
}
application/vnd.reviewboard.org.default-reviewer+xml¶
<?xml version="1.0" encoding="utf-8"?>
<rsp>
<stat>ok</stat>
<default_reviewer>
<file_regex>/docs/.*</file_regex>
<users>
<array>
<item>
<href>http://reviews.example.com/api/users/doc/</href>
<method>GET</method>
<title>doc</title>
</item>
</array>
</users>
<links>
<self>
<href>http://reviews.example.com/api/default-reviewers/1/</href>
<method>GET</method>
</self>
<update>
<href>http://reviews.example.com/api/default-reviewers/1/</href>
<method>PUT</method>
</update>
<delete>
<href>http://reviews.example.com/api/default-reviewers/1/</href>
<method>DELETE</method>
</delete>
</links>
<repositories>
<array>
<item>
<href>http://reviews.example.com/api/repositories/1/</href>
<method>GET</method>
<title>Review Board SVN</title>
</item>
</array>
</repositories>
<groups>
<array>
<item>
<href>http://reviews.example.com/api/groups/docs/</href>
<method>GET</method>
<title>docs</title>
</item>
</array>
</groups>
<id>1</id>
<name>docs-team</name>
</default_reviewer>
</rsp>