curl --request GET \
--url https://api.runaether.dev/pull-requests/{pullRequestID}/review/head-snapshot \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.runaether.dev/pull-requests/{pullRequestID}/review/head-snapshot"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.runaether.dev/pull-requests/{pullRequestID}/review/head-snapshot', 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",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
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}/review/head-snapshot"
req, _ := http.NewRequest("GET", 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.get("https://api.runaether.dev/pull-requests/{pullRequestID}/review/head-snapshot")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.runaether.dev/pull-requests/{pullRequestID}/review/head-snapshot")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
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>"
}
]
}Get the snapshot of a pull request head: its changed files against the base tip, their patches and their contents at the head
One read for everything the Diff tab draws at a head: GitHub’s changed-file listing of ref against the base branch at base_sha, with each file’s unified patch, and, for every file with a patch that exists at the head, the file’s content there (kind text with content, or binary, too_large; omitted, with the reason, when the snapshot carries no content for it, because its text would have overrun the snapshot’s budget or GitHub did not find or serve it at capture, in which case getPullRequestReviewFile serves it). A snapshot is captured once and then served from storage: kind ready is the snapshot, immutable, so a browser caches it for the listing’s life; it is sent gzip-encoded to a client whose Accept-Encoding accepts gzip (or every coding) and as plain JSON to one that does not, and refused with 406 to one that accepts neither (the answer varies on Accept-Encoding). The first reader to find no snapshot claims its capture and enqueues it; every reader meanwhile is answered kind capturing and reads again shortly, enqueueing nothing. A capture that gave up after its retries is answered kind failed with the error, which retryPullRequestReviewHeadSnapshotCapture starts again. ref and base_sha must be the head and the base tip the PullRequest currently names (head_sha and base_sha): GitHub lists only the current head against the current base, so a reader still showing an earlier listing is told the pull request moved (409), as the pinned diff read does, and the PullRequest’s next read names the new ones. Any member of an owning organization of the pull request may call it, a viewer included, and no GitHub connection is needed; org_id names the organization to read in, and omitted, the one where the caller holds a product role is preferred. A pull request that does not exist and one no organization of the caller owns answer the same 404.
curl --request GET \
--url https://api.runaether.dev/pull-requests/{pullRequestID}/review/head-snapshot \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.runaether.dev/pull-requests/{pullRequestID}/review/head-snapshot"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.runaether.dev/pull-requests/{pullRequestID}/review/head-snapshot', 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",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
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}/review/head-snapshot"
req, _ := http.NewRequest("GET", 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.get("https://api.runaether.dev/pull-requests/{pullRequestID}/review/head-snapshot")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.runaether.dev/pull-requests/{pullRequestID}/review/head-snapshot")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
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>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Query Parameters
The pull request's owning organization to act in: the org_id the PullRequest carries. Required when more than one of the caller's organizations owns the pull request.
^[0-9a-f]{40}$^[0-9a-f]{40}$Response
The head's snapshot, that its capture is under way, or that the capture gave up