Request a reviewer on a pull request
curl --request PUT \
--url https://api.runaether.dev/pull-requests/{pullRequestID}/github/reviewers/{kind}/{name} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.runaether.dev/pull-requests/{pullRequestID}/github/reviewers/{kind}/{name}"
headers = {"Authorization": "Bearer <token>"}
response = requests.put(url, headers=headers)
print(response.text)const options = {method: 'PUT', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.runaether.dev/pull-requests/{pullRequestID}/github/reviewers/{kind}/{name}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.runaether.dev/pull-requests/{pullRequestID}/github/reviewers/{kind}/{name}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.runaether.dev/pull-requests/{pullRequestID}/github/reviewers/{kind}/{name}"
req, _ := http.NewRequest("PUT", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.runaether.dev/pull-requests/{pullRequestID}/github/reviewers/{kind}/{name}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.runaether.dev/pull-requests/{pullRequestID}/github/reviewers/{kind}/{name}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"checks": [
{
"check_run_id": 4503599627370495,
"name": "<string>",
"status": "<string>",
"summary_truncated": true,
"completed_at": "2023-11-07T05:31:56Z",
"conclusion": "<string>",
"details_url": "<string>",
"started_at": "2023-11-07T05:31:56Z",
"summary": "<string>"
}
],
"merge_box": {
"additions": 1,
"author_login": "<string>",
"checks_failed": 1,
"checks_passed": 1,
"checks_total": 1,
"commits": 1,
"deletions": 1,
"draft": true,
"head_is_fork": true,
"head_sha": "<string>",
"html_url": "<string>",
"pr_number": 2,
"ready_for_merge": true,
"title": "<string>",
"base_branch": "<string>",
"base_sha": "<string>",
"ci_status": "pending",
"head_branch": "<string>",
"mergeable_state": "clean",
"merged_at": "2023-11-07T05:31:56Z",
"stack_children": [
{
"html_url": "<string>",
"pr_number": 2,
"pull_request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"state": "open",
"title": "<string>"
}
],
"stack_parent": {
"html_url": "<string>",
"pr_number": 2,
"pull_request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"state": "open",
"title": "<string>"
},
"state": "open"
},
"reviewers": [
{
"decision": "approved",
"is_bot": true,
"kind": "user",
"login": "<string>"
}
],
"reviews": [
{
"author_is_bot": true,
"author_login": "<string>",
"body": "<string>",
"github_review_id": 4503599627370496,
"html_url": "<string>",
"state": "<string>",
"submitted_at": "2023-11-07T05:31:56Z"
}
]
}{
"code": "account_deleting",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}{
"code": "account_deleting",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}{
"code": "account_deleting",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}{
"code": "account_deleting",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}{
"code": "account_deleting",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}{
"code": "account_deleting",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}{
"code": "account_deleting",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}{
"code": "account_deleting",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}{
"code": "account_deleting",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}Pull Requests
Request a reviewer on a pull request
Requests a review on a pull request from one GitHub user or team, named by kind and name, as the caller’s own GitHub user, and answers with the pull request read after it.
Use this tool when you need to:
- Ask a teammate or a team to review a pull request
- Add one reviewer without replacing the review requests someone else made
Examples:
- PUT /pull-requests//github/reviewers/user/octocat
- PUT /pull-requests/6f1c2a9e-3b7d-4c55-9a2e-0d8b1f4e7c21/github/reviewers/team/platform-reviewers
Hints:
- pullRequestID is the pull request’s uuid and org_id an optional uuid naming the owning organization to act in, the org_id getPullRequest answers. kind is user (name is a GitHub login, a bot’s with its [bot] suffix) or team (name is an organization team’s slug); name starts with a letter or digit, then letters, digits, dots, underscores or hyphens, at most 100 characters. A value outside those is a 422 from the schema; there is no body.
- One request per call, keyed by kind and name, so it never replaces the reviewer set; requesting one already requested changes nothing. GitHub judges the caller’s own permission, so a pull request’s author may request reviewers without push access.
- Answers 200 with the GitHubPullRequest, the shape getPullRequestGithub reads, as read after it (reviewers lists the request as pending); the mirror records the pull request GitHub answers with, so the next read reflects the change before its webhook arrives.
- Use removePullRequestGithubReviewer instead, a DELETE of the same path, to withdraw the request, and getPullRequestGithub to read the current reviewers.
- A member with a product role (owner, admin or member) in an owning organization of the pull request (one whose task published or reviewed it, or with a project on its repository) may call it while they keep GitHub access to its repository.
- A viewer or billing member is refused with 403 org_role_insufficient and a suspended organization with 403 org_suspended, each when no other owning organization admits the caller, and an agent host’s grant with 403 agent_host_route_not_allowed; 503 when the membership check is unavailable.
- A caller linked to the repository’s installation whose GitHub authorization is missing or revoked is refused with 409 github_identity_required (reconnect GitHub); GitHub refusing the request (its 403 or 422, such as a user who is not a collaborator) is a 422 with GitHub’s message, and any other GitHub failure a 502.
- A pull request that does not exist, one no organization of the caller owns, an org_id that does not own it and one whose repository the caller cannot see on GitHub (no link to its installation included) answer the same 404; omitting org_id while more than one owning organization admits the caller is a 422 org_id_required, and a GitHub access check that cannot run is a 500.
PUT
/
pull-requests
/
{pullRequestID}
/
github
/
reviewers
/
{kind}
/
{name}
Request a reviewer on a pull request
curl --request PUT \
--url https://api.runaether.dev/pull-requests/{pullRequestID}/github/reviewers/{kind}/{name} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.runaether.dev/pull-requests/{pullRequestID}/github/reviewers/{kind}/{name}"
headers = {"Authorization": "Bearer <token>"}
response = requests.put(url, headers=headers)
print(response.text)const options = {method: 'PUT', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.runaether.dev/pull-requests/{pullRequestID}/github/reviewers/{kind}/{name}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.runaether.dev/pull-requests/{pullRequestID}/github/reviewers/{kind}/{name}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.runaether.dev/pull-requests/{pullRequestID}/github/reviewers/{kind}/{name}"
req, _ := http.NewRequest("PUT", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.runaether.dev/pull-requests/{pullRequestID}/github/reviewers/{kind}/{name}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.runaether.dev/pull-requests/{pullRequestID}/github/reviewers/{kind}/{name}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"checks": [
{
"check_run_id": 4503599627370495,
"name": "<string>",
"status": "<string>",
"summary_truncated": true,
"completed_at": "2023-11-07T05:31:56Z",
"conclusion": "<string>",
"details_url": "<string>",
"started_at": "2023-11-07T05:31:56Z",
"summary": "<string>"
}
],
"merge_box": {
"additions": 1,
"author_login": "<string>",
"checks_failed": 1,
"checks_passed": 1,
"checks_total": 1,
"commits": 1,
"deletions": 1,
"draft": true,
"head_is_fork": true,
"head_sha": "<string>",
"html_url": "<string>",
"pr_number": 2,
"ready_for_merge": true,
"title": "<string>",
"base_branch": "<string>",
"base_sha": "<string>",
"ci_status": "pending",
"head_branch": "<string>",
"mergeable_state": "clean",
"merged_at": "2023-11-07T05:31:56Z",
"stack_children": [
{
"html_url": "<string>",
"pr_number": 2,
"pull_request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"state": "open",
"title": "<string>"
}
],
"stack_parent": {
"html_url": "<string>",
"pr_number": 2,
"pull_request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"state": "open",
"title": "<string>"
},
"state": "open"
},
"reviewers": [
{
"decision": "approved",
"is_bot": true,
"kind": "user",
"login": "<string>"
}
],
"reviews": [
{
"author_is_bot": true,
"author_login": "<string>",
"body": "<string>",
"github_review_id": 4503599627370496,
"html_url": "<string>",
"state": "<string>",
"submitted_at": "2023-11-07T05:31:56Z"
}
]
}{
"code": "account_deleting",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}{
"code": "account_deleting",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}{
"code": "account_deleting",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}{
"code": "account_deleting",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}{
"code": "account_deleting",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}{
"code": "account_deleting",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}{
"code": "account_deleting",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}{
"code": "account_deleting",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}{
"code": "account_deleting",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}Authorizations
Path Parameters
Query Parameters
The pull request's owning organization to act in: the org_id the PullRequest carries. Omitted, getPullRequest and the review page's operations (its review, file, head snapshot and stack) act in the owning organization getPullRequest ranks first, and a console operation refuses with 422 org_id_required when more than one of the caller's organizations owns the pull request.