Change who may watch a pull request's proof
curl --request PATCH \
--url https://api.runaether.dev/pull-requests/{pullRequestID}/proof \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{}'import requests
url = "https://api.runaether.dev/pull-requests/{pullRequestID}/proof"
payload = {}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch('https://api.runaether.dev/pull-requests/{pullRequestID}/proof', 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}/proof",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
]),
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}/proof"
payload := strings.NewReader("{}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.runaether.dev/pull-requests/{pullRequestID}/proof")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.runaether.dev/pull-requests/{pullRequestID}/proof")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{}"
response = http.request(request)
puts response.read_body{
"can_hide": true,
"published": [
{
"linked_at": "2023-11-07T05:31:56Z",
"media": [
{
"capture": {
"actions": [
{
"at_ms": 1,
"kind": "click",
"label": "<string>"
}
],
"chapters": [
{
"at_ms": 1,
"title": "<string>",
"description": "<string>"
}
],
"description": "<string>",
"duration_ms": 1,
"height": 2,
"kind": "recording",
"pages": [
"<string>"
],
"source": "browser",
"title": "<string>",
"width": 2,
"ending": "stopped",
"notes": [
"<string>"
]
},
"content_type": "image/png",
"created_at": "2023-11-07T05:31:56Z",
"head_sha": "<string>",
"hidden": {
"at": "2023-11-07T05:31:56Z",
"by": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"hideable": true,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"public_url": "<string>",
"tracks": [
{
"byte_size": 26214400,
"format": "aether.cpu.v2",
"kind": "cpu",
"url": "<string>"
}
]
}
],
"steerers": [
{
"first_turn": {
"message_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"turn_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"person": {
"display_name": "<string>",
"github_login": "<string>",
"kind": "user",
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}
],
"task_creator": {
"first_turn": {
"message_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"turn_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"person": {
"display_name": "<string>",
"github_login": "<string>",
"kind": "user",
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
},
"task_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"task_name": "<string>"
}
],
"pull_request": {
"head_sha": "<string>",
"html_url": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"merged_at": "2023-11-07T05:31:56Z",
"pr_number": 2,
"repository": "<string>",
"title": "<string>"
},
"review_runs": [
{
"linked_at": "2023-11-07T05:31:56Z",
"media": [
{
"capture": {
"actions": [
{
"at_ms": 1,
"kind": "click",
"label": "<string>"
}
],
"chapters": [
{
"at_ms": 1,
"title": "<string>",
"description": "<string>"
}
],
"description": "<string>",
"duration_ms": 1,
"height": 2,
"kind": "recording",
"pages": [
"<string>"
],
"source": "browser",
"title": "<string>",
"width": 2,
"ending": "stopped",
"notes": [
"<string>"
]
},
"content_type": "image/png",
"created_at": "2023-11-07T05:31:56Z",
"head_sha": "<string>",
"hidden": {
"at": "2023-11-07T05:31:56Z",
"by": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"hideable": true,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"public_url": "<string>",
"tracks": [
{
"byte_size": 26214400,
"format": "aether.cpu.v2",
"kind": "cpu",
"url": "<string>"
}
]
}
],
"reviewed_head_sha": "<string>",
"run_number": 2,
"task_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"task_name": "<string>",
"verdict": "COMMENT"
}
],
"reviewer_confirmations": [
{
"line": 2,
"path": "<string>",
"reviewed_at": "2023-11-07T05:31:56Z",
"reviewed_head_sha": "<string>",
"run": {
"run_number": 2,
"task_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"side": "LEFT",
"text": "<string>"
}
],
"shown_claims": [
{
"created_at": "2023-11-07T05:31:56Z",
"evidence": {
"capture_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"kind": "capture"
},
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"text": "<string>"
}
],
"visibility": {
"changed": {
"at": "2023-11-07T05:31:56Z",
"by": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"by_name": "<string>"
},
"visibility": "public"
}
}{
"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
Change who may watch a pull request's proof
Merge-patches a pull request's proof, setting who may watch it, and answers with the proof getPullRequestProof reads.
Use this tool when you need to:
- Make a pull request's proof private to its organization so its public link stops answering
- Make a private proof public again so anyone holding its link can watch it
Examples:
- PATCH /pull-requests/{pullRequestID}/proof {"visibility": "org"}
- PATCH /pull-requests/6f1c2a9e-3b7d-4c55-9a2e-0d8b1f4e7c21/proof?org_id=0b9d3e57-2c1a-4f6e-8d7b-5a4c3e2f1d09 {"visibility": "public"}
Hints:
- pullRequestID is the pull request's uuid and org_id (uuid) names an organization whose task links the pull request. The body must name visibility, org (private to the organization) or public: the schema answers 422 for an empty object, another key or another value, null is 422, and a missing body or one that is not JSON is 400.
- A proof nobody set a visibility on takes its organization's new_pull_request_proof_public. The patch records one decision for the pull request, with who changed it and when (visibility.changed).
- Answers 200 with the whole proof getPullRequestProof answers, read after the change.
- Use updateOrg instead to change new_pull_request_proof_public, the default new pull requests take, and patchTaskMedia to hide a single capture rather than the whole proof.
- The readers who may hide one of its captures may call it: the creator of a task linked to the pull request, or an admin or owner of an organization whose task published or reviewed it, while they keep GitHub access to the repository, checked live through their own GitHub connection.
- Any other member with a product role is refused with 403 control_forbidden, and a viewer or billing member before that with 403 org_role_insufficient.
- 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 GitHub access the caller has lost (or never connected) answer the same 404, and omitting org_id while more than one of the caller's organizations owns it is 422 org_id_required.
- A member of a suspended organization is refused with 403 org_suspended when no other owner admits them, an agent host's grant with 403 agent_host_route_not_allowed, and 503 answers when the membership check is unavailable.
PATCH
/
pull-requests
/
{pullRequestID}
/
proof
Change who may watch a pull request's proof
curl --request PATCH \
--url https://api.runaether.dev/pull-requests/{pullRequestID}/proof \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{}'import requests
url = "https://api.runaether.dev/pull-requests/{pullRequestID}/proof"
payload = {}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch('https://api.runaether.dev/pull-requests/{pullRequestID}/proof', 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}/proof",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
]),
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}/proof"
payload := strings.NewReader("{}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.runaether.dev/pull-requests/{pullRequestID}/proof")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.runaether.dev/pull-requests/{pullRequestID}/proof")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{}"
response = http.request(request)
puts response.read_body{
"can_hide": true,
"published": [
{
"linked_at": "2023-11-07T05:31:56Z",
"media": [
{
"capture": {
"actions": [
{
"at_ms": 1,
"kind": "click",
"label": "<string>"
}
],
"chapters": [
{
"at_ms": 1,
"title": "<string>",
"description": "<string>"
}
],
"description": "<string>",
"duration_ms": 1,
"height": 2,
"kind": "recording",
"pages": [
"<string>"
],
"source": "browser",
"title": "<string>",
"width": 2,
"ending": "stopped",
"notes": [
"<string>"
]
},
"content_type": "image/png",
"created_at": "2023-11-07T05:31:56Z",
"head_sha": "<string>",
"hidden": {
"at": "2023-11-07T05:31:56Z",
"by": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"hideable": true,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"public_url": "<string>",
"tracks": [
{
"byte_size": 26214400,
"format": "aether.cpu.v2",
"kind": "cpu",
"url": "<string>"
}
]
}
],
"steerers": [
{
"first_turn": {
"message_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"turn_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"person": {
"display_name": "<string>",
"github_login": "<string>",
"kind": "user",
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}
],
"task_creator": {
"first_turn": {
"message_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"turn_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"person": {
"display_name": "<string>",
"github_login": "<string>",
"kind": "user",
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
},
"task_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"task_name": "<string>"
}
],
"pull_request": {
"head_sha": "<string>",
"html_url": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"merged_at": "2023-11-07T05:31:56Z",
"pr_number": 2,
"repository": "<string>",
"title": "<string>"
},
"review_runs": [
{
"linked_at": "2023-11-07T05:31:56Z",
"media": [
{
"capture": {
"actions": [
{
"at_ms": 1,
"kind": "click",
"label": "<string>"
}
],
"chapters": [
{
"at_ms": 1,
"title": "<string>",
"description": "<string>"
}
],
"description": "<string>",
"duration_ms": 1,
"height": 2,
"kind": "recording",
"pages": [
"<string>"
],
"source": "browser",
"title": "<string>",
"width": 2,
"ending": "stopped",
"notes": [
"<string>"
]
},
"content_type": "image/png",
"created_at": "2023-11-07T05:31:56Z",
"head_sha": "<string>",
"hidden": {
"at": "2023-11-07T05:31:56Z",
"by": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"hideable": true,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"public_url": "<string>",
"tracks": [
{
"byte_size": 26214400,
"format": "aether.cpu.v2",
"kind": "cpu",
"url": "<string>"
}
]
}
],
"reviewed_head_sha": "<string>",
"run_number": 2,
"task_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"task_name": "<string>",
"verdict": "COMMENT"
}
],
"reviewer_confirmations": [
{
"line": 2,
"path": "<string>",
"reviewed_at": "2023-11-07T05:31:56Z",
"reviewed_head_sha": "<string>",
"run": {
"run_number": 2,
"task_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"side": "LEFT",
"text": "<string>"
}
],
"shown_claims": [
{
"created_at": "2023-11-07T05:31:56Z",
"evidence": {
"capture_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"kind": "capture"
},
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"text": "<string>"
}
],
"visibility": {
"changed": {
"at": "2023-11-07T05:31:56Z",
"by": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"by_name": "<string>"
},
"visibility": "public"
}
}{
"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
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.
Response
OK