Cancel the review of a pull request by a user¶
DELETE /api/v5/repos/{owner}/{repo}/pulls/{number}/assignees
This endpoint cancels a review already assigned to a user on the specified pull request. It withdraws the user's reviewer eligibility, releases the review task, and ensures that the user no longer participates in reviewing that pull request.
Access token support¶
- AtomGit user access tokens
Anonymous access allowed¶
This endpoint does not allow anonymous access.
Request parameters¶
| Parameter | Location | Type | Required | Description |
|---|---|---|---|---|
owner |
path | string | Yes | The namespace address the repository belongs to (the address path of an organization or individual) |
repo |
path | string | Yes | Repository path (path) |
number |
path | integer | Yes | The number of the PR, that is, the ordinal number of the PR in this repository |
access_token |
query | string | Yes | User authorization code |
assignees |
query | string | No | The personal namespace addresses of the users, separated by , |
Request example¶
Parameter description¶
<owner>— replace with the namespace address the repository belongs to (the address path of an organization or individual);<repo>— replace with the repository path (path);<number>— replace with the number of the PR (that is, the ordinal number of the PR in this repository, starting from0);<assignees>— replace with the personal namespace addresses of the users whose reviews are to be canceled, with multiple users separated by,;<token>— replace with your AtomGit user access token.
cURL¶
curl -X DELETE 'https://api.atomgit.com/api/v5/repos/<owner>/<repo>/pulls/<number>/assignees?access_token=<token>&assignees=<assignees>' -H 'Accept: application/json'
JavaScript¶
// Native fetch (Node.js 18+ / browser)
const url = new URL("https://api.atomgit.com/api/v5/repos/<owner>/<repo>/pulls/<number>/assignees");
url.searchParams.set("access_token", "<YOUR-TOKEN>");
url.searchParams.set("assignees", "<assignees>");
const response = await fetch(url, {
method: "DELETE",
headers: {
"Accept": "application/json",
},
});
if (!response.ok) {
throw new Error(`Request failed: ${response.status}`);
}
const data = await response.json();
console.log(data);
Python¶
import requests
url = "https://api.atomgit.com/api/v5/repos/<owner>/<repo>/pulls/<number>/assignees"
params = {
"access_token": "<YOUR-TOKEN>",
"assignees": "<assignees>",
}
resp = requests.delete(url, params=params, timeout=10)
resp.raise_for_status()
print(resp.json())
Response parameters¶
On success, this endpoint returns an empty object ({}), and the response body contains no business fields.
Response example¶
Status code: 200
Error responses¶
This endpoint requires a user access token. If the request is unauthenticated or the token is invalid, it returns 401. The field names in the error response are subject to what the backend actually returns; an example is shown below:
401 Unauthenticated
HTTP response status codes¶
| Status code | Description |
|---|---|
200 |
Success (OK) |
401 |
Requires authentication |
403 |
Forbidden |
404 |
Resource not found (Not Found) |
Error codes¶
| Error code | Description |
|---|---|
401 |
Unauthenticated or invalid credentials (missing/invalid access credentials) |
403 |
No permission to perform this operation |
404 |
Request path not found |
429 |
Too many requests, rate limit triggered |
500 |
Internal server error |
Markdown source: View on AtomGit·Content from the open-source project gitcode-dev/atomgit-api-doc