Default Reviewer Resource¶
Added in 1.6.16
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.
Details¶
Name | default_reviewer |
URI | /api/default-reviewers/{default_reviewer_id}/ |
Token Policy ID | default_reviewer |
HTTP Methods | |
Parent Resource | |
Child Resources | None |
Fields¶
file_regexString | The regular expression that is used to match files uploaded in a diff. |
groupsString | A comma-separated list of group names that this default reviewer applies to matched review requests. |
idInteger | The numeric ID of the default reviewer. |
nameString | The descriptive name of the entry. |
repositoriesString | A comma-separated list of repository IDs that this default reviewer will match against. |
usersString | A comma-separated list of usernames that this default reviewer applies to matched review requests. |
Links¶
Name |
Method |
Resource |
---|---|---|
delete | DELETE |
|
self | GET |
|
update | PUT |
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.
Errors¶
100 - Does Not ExistHTTP 404 - Not Found | Object does not exist |
101 - Permission DeniedHTTP 403 - Forbidden | You don’t have permission for this |
103 - Not Logged InHTTP 401 - Unauthorized | You are not logged in |
112 - OAuth2 Missing Scope ErrorHTTP 403 - Forbidden | Your OAuth2 token lacks the necessary scopes for this request. |
113 - OAuth2 Access Denied ErrorHTTP 403 - Forbidden | OAuth2 token access for this resource is prohibited. |
HTTP GET¶
Retrieves information on a particular default reviewer.
Errors¶
100 - Does Not ExistHTTP 404 - Not Found | Object does not exist |
101 - Permission DeniedHTTP 403 - Forbidden | You don’t have permission for this |
103 - Not Logged InHTTP 401 - Unauthorized | You are not logged in |
112 - OAuth2 Missing Scope ErrorHTTP 403 - Forbidden | Your OAuth2 token lacks the necessary scopes for this request. |
113 - OAuth2 Access Denied ErrorHTTP 403 - Forbidden | OAuth2 token access for this resource is prohibited. |
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¶
file_regexString | The regular expression used to match file paths in newly uploaded diffs. |
groupsString | A comma-separated list of group names. |
nameString | The name of the default reviewer entry. |
repositoriesString | A comma-separated list of repository IDs. |
usersString | A comma-separated list of usernames. |
Errors¶
100 - Does Not ExistHTTP 404 - Not Found | Object does not exist |
101 - Permission DeniedHTTP 403 - Forbidden | You don’t have permission for this |
103 - Not Logged InHTTP 401 - Unauthorized | You are not logged in |
105 - Invalid Form DataHTTP 400 - Bad Request | One or more fields had errors |
112 - OAuth2 Missing Scope ErrorHTTP 403 - Forbidden | Your OAuth2 token lacks the necessary scopes for this request. |
113 - OAuth2 Access Denied ErrorHTTP 403 - Forbidden | OAuth2 token access for this resource is prohibited. |
Examples¶
application/vnd.reviewboard.org.default-reviewer+json¶
$ curl https://reviews.example.com/api/default-reviewers/1/ -H "Accept: application/json"
HTTP 200 OK
Content-Length: 622
Content-Type: application/vnd.reviewboard.org.default-reviewer+json
ETag: ee72a4f53555ce4a26e83459ab4531aef36a31eb
Vary: Accept, Cookie
X-Content-Type-Options: nosniff
{
"default_reviewer": {
"file_regex": "/docs/.*",
"groups": [],
"id": 1,
"links": {
"delete": {
"href": "https://reviews.example.com/api/default-reviewers/1/",
"method": "DELETE"
},
"self": {
"href": "https://reviews.example.com/api/default-reviewers/1/",
"method": "GET"
},
"update": {
"href": "https://reviews.example.com/api/default-reviewers/1/",
"method": "PUT"
}
},
"name": "docs-team",
"repositories": [
{
"href": "https://reviews.example.com/api/repositories/1/",
"method": "GET",
"title": "Review Board SVN"
}
],
"users": [
{
"href": "https://reviews.example.com/api/users/doc/",
"method": "GET",
"title": "doc"
}
]
},
"stat": "ok"
}