Post a top-level comment on a pull request
curl --request POST \
--url https://api.runaether.dev/pull-requests/{pullRequestID}/github/comments \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"body": "<string>",
"idempotency_key": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'import requests
url = "https://api.runaether.dev/pull-requests/{pullRequestID}/github/comments"
payload = {
"body": "<string>",
"idempotency_key": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
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({
body: JSON.stringify('<string>'),
idempotency_key: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
})
};
fetch('https://api.runaether.dev/pull-requests/{pullRequestID}/github/comments', 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/comments",
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([
'body' => '<string>',
'idempotency_key' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]),
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}/github/comments"
payload := strings.NewReader("{\n \"body\": \"<string>\",\n \"idempotency_key\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\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}/github/comments")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"body\": \"<string>\",\n \"idempotency_key\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.runaether.dev/pull-requests/{pullRequestID}/github/comments")
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 \"body\": \"<string>\",\n \"idempotency_key\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}"
response = http.request(request)
puts response.read_body{
"author_association": "<string>",
"author_login": "<string>",
"body": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"github_comment_id": 4503599627370496
}{
"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
Post a top-level comment on a pull request
Posts a top-level comment on a pull request as Aether's GitHub App, attributed to the caller, and answers 201 with the comment GitHub created.
Use this tool when you need to:
- Leave a general comment in a pull request's conversation, not tied to a file or line
- Post a note on a pull request that is safe to retry with the same idempotency key
Examples:
- POST /pull-requests/{pullRequestID}/github/comments {"idempotency_key": "2f8c4d1a-7b3e-4a9f-8c2d-5e6f7a8b9c0d", "body": "Holding the merge until the release cut on Friday."}
- POST /pull-requests/6f1c2a9e-3b7d-4c55-9a2e-0d8b1f4e7c21/github/comments?org_id=0b9d3e57-2c1a-4f6e-8d7b-5a4c3e2f1d09 {"idempotency_key": "7c1e9b2a-4d3f-4e8a-9b6c-1a2d3e4f5a6b", "body": "Ready for another look."}
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. The body requires idempotency_key (a uuid) and body (at least one character other than space, tab, newline, form feed or carriage return); a missing, malformed or unknown field is a 422 from the schema, and a body that is not JSON a 400.
- GitHub shows the comment as posted by Aether's App, its first line naming the caller (their display name, else their email) via Aether; Aether records it as the App's own comment, so its webhook is recognised as such.
- The idempotency key is the caller's on this pull request and claimed before GitHub is called: a completed key replays its comment without posting again, and a key whose first attempt failed or never finished is a 409 idempotency_key_conflict, so a deliberate new comment needs a new key.
- Answers 201 with github_comment_id (an integer from 1 to 9007199254740991), author_login, author_association, body as GitHub stored it and created_at.
- GitHub's 422 (a body over its length limit, for one) is a 422 with its message and any other GitHub failure a 502, either one burning the key; 500 when the caller's profile cannot be read, before the key is claimed.
- Use createPullRequestGithubCommentReply instead to answer a review thread as the caller's own GitHub user, and createPullRequestGithubReview to submit a verdict with inline comments.
- 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 can read its repository on GitHub themselves.
- 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 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 usable GitHub authorization for 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.
POST
/
pull-requests
/
{pullRequestID}
/
github
/
comments
Post a top-level comment on a pull request
curl --request POST \
--url https://api.runaether.dev/pull-requests/{pullRequestID}/github/comments \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"body": "<string>",
"idempotency_key": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'import requests
url = "https://api.runaether.dev/pull-requests/{pullRequestID}/github/comments"
payload = {
"body": "<string>",
"idempotency_key": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
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({
body: JSON.stringify('<string>'),
idempotency_key: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
})
};
fetch('https://api.runaether.dev/pull-requests/{pullRequestID}/github/comments', 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/comments",
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([
'body' => '<string>',
'idempotency_key' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]),
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}/github/comments"
payload := strings.NewReader("{\n \"body\": \"<string>\",\n \"idempotency_key\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\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}/github/comments")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"body\": \"<string>\",\n \"idempotency_key\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.runaether.dev/pull-requests/{pullRequestID}/github/comments")
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 \"body\": \"<string>\",\n \"idempotency_key\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}"
response = http.request(request)
puts response.read_body{
"author_association": "<string>",
"author_login": "<string>",
"body": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"github_comment_id": 4503599627370496
}{
"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
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. 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