This page describes the REST endpoints that are added by the reviewers plugin.
Please also take note of the general information on the REST API.
GET /projects/project_name/reviewers
Gets the default reviewers for specified project.
GET /projects/myproject/reviewers HTTP/1.0
As response a List of ReviewerFilter is returned that describes the default reviewers for myproject.
HTTP/1.1 200 OK
Content-Disposition: attachment
Content-Type: application/json;charset=UTF-8
)]}'
[
{
"filter": "branch:master",
"reviewers": [
"UserA",
"UserB"
],
"cc": [
"DevGroup"
]
},
{
"filter": "file:^lib/*",
"reviewers": [
"UserB",
"UserC"
]
}
]
POST /projects/project_name/reviewers
Changes the default reviewers for the specified project.
The change to reviewers must be provided in the request body inside a ConfigReviewersInput entity.
Caller must be a member of a group that is granted the ‘Modify Reviewers Config’ capability (provided by this plugin) or be a Project Owner for the project.
POST /projects/myproject/reviewers HTTP/1.0
Content-Type: application/json;charset=UTF-8
{
"action": "ADD",
"type": "REVIEWER"
"filter": "branch:master",
"reviewer": "UserA",
}
As response the default reviewers are returned as a list of ReviewerFilter.
HTTP/1.1 200 OK
Content-Disposition: attachment
Content-Type: application/json;charset=UTF-8
)]}'
[
{
"filter": "branch:master",
"reviewers": [
"UserA",
"UserB"
]
"ccs": [
"DevGroup"
]
},
{
"filter": "file:^lib/*",
"reviewers": [
"UserB",
"UserC"
]
}
]
The ReviewerFilter
entity contains a filter of the default reviewers.
The ConfigReviewersInput
entity contains an update for the default reviewers.
Part of Gerrit Code Review