Retry the capture of a pull request head's snapshot that gave up
curl --request POST \
--url https://api.runaether.dev/pull-requests/{pullRequestID}/review/head-snapshot/capture \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"base_sha": "<string>",
"ref": "<string>"
}
'import requests
url = "https://api.runaether.dev/pull-requests/{pullRequestID}/review/head-snapshot/capture"
payload = {
"base_sha": "<string>",
"ref": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({base_sha: '<string>', ref: '<string>'})
};
fetch('https://api.runaether.dev/pull-requests/{pullRequestID}/review/head-snapshot/capture', 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}/review/head-snapshot/capture",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'base_sha' => '<string>',
'ref' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.runaether.dev/pull-requests/{pullRequestID}/review/head-snapshot/capture"
payload := strings.NewReader("{\n \"base_sha\": \"<string>\",\n \"ref\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.runaether.dev/pull-requests/{pullRequestID}/review/head-snapshot/capture")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"base_sha\": \"<string>\",\n \"ref\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.runaether.dev/pull-requests/{pullRequestID}/review/head-snapshot/capture")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"base_sha\": \"<string>\",\n \"ref\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"base_sha": "<string>",
"files": [
{
"additions": 1,
"category": "implementation",
"deletions": 1,
"path": "<string>",
"status": "added",
"head": {
"content": "<string>",
"kind": "text"
},
"patch": "<string>",
"previous_path": "<string>"
}
],
"head_sha": "<string>",
"kind": "ready",
"truncated": true
}{
"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
Retry the capture of a pull request head's snapshot that gave up
Starts again the capture of a pull request head's snapshot that getPullRequestReviewHeadSnapshot answered kind failed, and answers the capture's current state.
Use this tool when you need to:
- Retry a head snapshot whose capture gave up after its retries, once the reader has seen its error
- Get the Diff tab going again after a transient GitHub failure froze a head's capture as failed
Examples:
- POST /pull-requests/{pullRequestID}/review/head-snapshot/capture {"ref": "1a954628a960aaef81d7b2d4521929579f3541e6", "base_sha": "1405df66cbe219b0bf6355bc3d60361a8376b6b4"}
- POST /pull-requests/6f1c2a9e-3b7d-4c55-9a2e-0d8b1f4e7c21/review/head-snapshot/capture?org_id=0b9d3e57-2c1a-4f6e-8d7b-5a4c3e2f1d09 {"ref": "1a954628a960aaef81d7b2d4521929579f3541e6", "base_sha": "1405df66cbe219b0bf6355bc3d60361a8376b6b4"}
Hints:
- pullRequestID is the pull request's uuid and org_id (uuid) is optional, resolved as getPullRequest resolves it. The JSON body requires ref and base_sha, full lowercase 40-hex SHAs naming the listing as the read names it; the schema answers 422 for a missing or malformed one.
- ref and base_sha must be the head_sha and base_sha the PullRequest currently names, with the read's same 409 otherwise.
- A failed capture starts again and the answer is kind capturing. A capture in any other state is answered as getPullRequestReviewHeadSnapshot answers it, so the answer is the capture's current state: capturing while under way, the ready snapshot (with the read's encoding, caching and 406 rules), and a listing nobody asked for yet is claimed and enqueued like a read.
- Use getPullRequestReviewHeadSnapshot instead to read a snapshot and poll a capture under way.
- Any member of an owning organization (one with a review run of the pull request or a non-archived project on its repository) may call it, a viewer included, and no GitHub connection is needed. A pull request that does not exist, one no organization of the caller owns and an org_id that does not own it answer the same 404.
- When no owner admits the caller, a billing member is refused with 403 org_role_insufficient and a member of a suspended organization with 403 org_suspended; an agent host's grant is refused with 403 agent_host_route_not_allowed, and 503 answers when the membership check is unavailable.
POST
/
pull-requests
/
{pullRequestID}
/
review
/
head-snapshot
/
capture
Retry the capture of a pull request head's snapshot that gave up
curl --request POST \
--url https://api.runaether.dev/pull-requests/{pullRequestID}/review/head-snapshot/capture \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"base_sha": "<string>",
"ref": "<string>"
}
'import requests
url = "https://api.runaether.dev/pull-requests/{pullRequestID}/review/head-snapshot/capture"
payload = {
"base_sha": "<string>",
"ref": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({base_sha: '<string>', ref: '<string>'})
};
fetch('https://api.runaether.dev/pull-requests/{pullRequestID}/review/head-snapshot/capture', 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}/review/head-snapshot/capture",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'base_sha' => '<string>',
'ref' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.runaether.dev/pull-requests/{pullRequestID}/review/head-snapshot/capture"
payload := strings.NewReader("{\n \"base_sha\": \"<string>\",\n \"ref\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.runaether.dev/pull-requests/{pullRequestID}/review/head-snapshot/capture")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"base_sha\": \"<string>\",\n \"ref\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.runaether.dev/pull-requests/{pullRequestID}/review/head-snapshot/capture")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"base_sha\": \"<string>\",\n \"ref\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"base_sha": "<string>",
"files": [
{
"additions": 1,
"category": "implementation",
"deletions": 1,
"path": "<string>",
"status": "added",
"head": {
"content": "<string>",
"kind": "text"
},
"patch": "<string>",
"previous_path": "<string>"
}
],
"head_sha": "<string>",
"kind": "ready",
"truncated": true
}{
"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
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.
Body
application/json
Response
The capture's state after the retry: under way, or the snapshot itself