create review requests for a pull request
const url = 'https://gitea.example.com/api/v1/repos/example/example/pulls/1/requested_reviewers';const options = { method: 'POST', headers: {Authorization: 'Basic <credentials>', 'Content-Type': 'application/json'}, body: '{"reviewers":["example"],"team_reviewers":["example"]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://gitea.example.com/api/v1/repos/example/example/pulls/1/requested_reviewers \ --header 'Authorization: Basic <credentials>' \ --header 'Content-Type: application/json' \ --data '{ "reviewers": [ "example" ], "team_reviewers": [ "example" ] }'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Owner of the repo
Name of the repo
Index of the pull request
Request Body
Section titled “Request Body”PullReviewRequestOptions are options to add or remove pull review requests
object
Examplegenerated
{ "reviewers": [ "example" ], "team_reviewers": [ "example" ]}PullReviewRequestOptions are options to add or remove pull review requests
object
Responses
Section titled “Responses”PullReviewList
PullReview represents a pull request review
object
ReviewStateType review state type
Team represents a team in an organization
object
Organization represents an organization
object
Deprecated
object
User represents a user
object
Is user active
URL to the user’s avatar
The user’s description
User counts
The user’s full name
URL to the user’s gitea page
The user’s id
Is the user an administrator
User locale
The user’s location
The user’s username
The user’s authentication sign-in name.
Is user login prohibited
Is user restricted
The ID of the user’s Authentication Source
User visibility level option: public, limited, private
The user’s website
Example
[ { "team": { "permission": "none", "units": [ "repo.code", "repo.issues", "repo.ext_issues", "repo.wiki", "repo.pulls", "repo.releases", "repo.projects", "repo.ext_wiki" ], "units_map": { "repo.code": "read", "repo.ext_issues": "none", "repo.ext_wiki": "none", "repo.issues": "write", "repo.projects": "none", "repo.pulls": "owner", "repo.releases": "none", "repo.wiki": "admin" } }, "user": { "login_name": "empty" } }]APINotFound is a not found empty response
APIValidationError is error format response related to input validation