curl --request GET \
--url https://api.runaether.dev/orgs/{orgID}/pull-requests \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.runaether.dev/orgs/{orgID}/pull-requests"
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/orgs/{orgID}/pull-requests', 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/orgs/{orgID}/pull-requests",
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/orgs/{orgID}/pull-requests"
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/orgs/{orgID}/pull-requests")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.runaether.dev/orgs/{orgID}/pull-requests")
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{
"items": [
{
"additions": 1,
"checks_failed": 1,
"checks_passed": 1,
"checks_total": 1,
"comment_count": 1,
"deletions": 1,
"dispatch_target": "author_task",
"draft": true,
"github_updated_at": "2023-11-07T05:31:56Z",
"html_url": "<string>",
"latest_created_at": "2023-11-07T05:31:56Z",
"needs_attention": true,
"org_id": "<string>",
"pr_number": 2,
"pull_request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"ready_for_merge": true,
"repo_name": "<string>",
"repo_owner": "<string>",
"review_runs": [
{
"agent_type": "codex",
"created_at": "2023-11-07T05:31:56Z",
"model": "<string>",
"run_number": 2,
"status": "reviewing",
"task_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"duration_seconds": 1,
"error": "<string>",
"head_sha": "<string>",
"trigger": "automatic"
}
],
"section": "in_review",
"title": "<string>",
"viewer_standing": "author",
"author_login": "<string>",
"base_branch": "<string>",
"base_sha": "<string>",
"ci_status": "pending",
"guide_outline": [
{
"paths": [
"<string>"
],
"title": "<string>"
}
],
"head_branch": "<string>",
"head_sha": "<string>",
"merged_at": "2023-11-07T05:31:56Z",
"origin_task": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"turn_count": 1
},
"pr_state": "open",
"severity_counts": {
"confirmed": 1,
"nit": 1,
"p1": 1,
"p2": 1,
"question": 1
},
"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>"
},
"summary_severity": "p1",
"verdict": "approve"
}
],
"next_cursor": "<string>"
}{
"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": "org_membership_required",
"error": "<string>"
}{
"code": "account_deleting",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}{
"code": "account_deleting",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}List the organization's pull requests
Lists one page of the organization’s pull requests, each a PullRequest with its review_runs newest first and the list section it sits in.
Use this tool when you need to:
- Browse the open pull requests of the repositories the organization’s projects connect, reviewed by Aether or not
- Page through the pull requests the organization’s review runs reviewed (view=reviews), or the open ones that need the caller first (view=queue)
- Find pull requests by author, reviewer, repository, state, open or update window, or a title or number search
Examples:
- GET /orgs//pull-requests?view=queue&limit=20
- GET /orgs/6f1c2a9e-3b7d-4c55-9a2e-0d8b1f4e7c21/pull-requests?pr_state=open,merged&repo_owner=acme&repo_name=web&q=login+flake
Hints:
- orgID is the organization’s uuid; a malformed one is 400 before the operation runs. Every query parameter is optional and combines with every other: view, project_id (uuid), status, pr_state, viewer, author, reviewer, repo_owner, repo_name, opened_after, opened_before, updated_after, updated_before, drafts=exclude, q, section, limit (1 to 100, 20 when omitted) and cursor.
- Without a view: every pull request of a repository the organization has a non-archived project for, reviewed or not, newest opened first as GitHub orders them, and only the open ones unless pr_state names others. view=reviews keeps the pull requests the organization’s review runs reviewed, newest activity first (the later of the newest run and the merge); view=queue keeps the open ones among them, the ones whose newest run or posted verdict needs the caller first.
- section is in_review while the pull request’s newest run is reviewing, approved when that run’s standing verdict approves the current head, and other for the rest; section=in_review, approved or other keeps one section in the list’s order.
- status is a comma-joined list of reviewing, completed, failed, cancelled, superseded, archived and unreviewed, matched against the latest run; unreviewed matches a pull request with no runs, and only without a view. pr_state is a comma-joined list of open, closed and merged. viewer=author keeps the pull requests the caller opened (by their stored GitHub login or a task of theirs publishing it), viewer=involved adds the ones they review.
- author, reviewer and repo_owner are GitHub logins and repo_name a repository name, each matched case-insensitively; the four time bounds are UTC instants ending in Z, after inclusive and before exclusive. q is trimmed and empty is no search: all digits, or # and digits, keeps the pull request with that number, and anything else keeps titles holding its words in order, case-insensitively.
- Paged by cursor: send the previous page’s next_cursor as cursor (a cursor from any page of the same list also pages inside a section); next_cursor is null on the last page, and a pull request added after the first page never shifts a later one.
- The schema answers 422 for a value outside a parameter’s format, enum, pattern or range. The handler answers 422 for unreviewed with a view, an empty opened or updated window, a q over 200 characters, holding a control character or naming a number outside 1 to 2147483647, and a malformed cursor or one minted for another organization, caller, view, filter set or search.
- Use listPullRequestSections instead to count each section under the same filters, getPullRequest to read one pull request by its id, and getRepoPullRequest to find one by repository and number.
- Any member of the organization may call it, a viewer included; a billing member is refused with 403 org_role_insufficient, a non-member with 403 org_membership_required, a suspended organization with 403 org_suspended, and an agent host’s grant with 403 agent_host_route_not_allowed; 503 when the membership check is unavailable.
curl --request GET \
--url https://api.runaether.dev/orgs/{orgID}/pull-requests \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.runaether.dev/orgs/{orgID}/pull-requests"
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/orgs/{orgID}/pull-requests', 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/orgs/{orgID}/pull-requests",
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/orgs/{orgID}/pull-requests"
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/orgs/{orgID}/pull-requests")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.runaether.dev/orgs/{orgID}/pull-requests")
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{
"items": [
{
"additions": 1,
"checks_failed": 1,
"checks_passed": 1,
"checks_total": 1,
"comment_count": 1,
"deletions": 1,
"dispatch_target": "author_task",
"draft": true,
"github_updated_at": "2023-11-07T05:31:56Z",
"html_url": "<string>",
"latest_created_at": "2023-11-07T05:31:56Z",
"needs_attention": true,
"org_id": "<string>",
"pr_number": 2,
"pull_request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"ready_for_merge": true,
"repo_name": "<string>",
"repo_owner": "<string>",
"review_runs": [
{
"agent_type": "codex",
"created_at": "2023-11-07T05:31:56Z",
"model": "<string>",
"run_number": 2,
"status": "reviewing",
"task_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"duration_seconds": 1,
"error": "<string>",
"head_sha": "<string>",
"trigger": "automatic"
}
],
"section": "in_review",
"title": "<string>",
"viewer_standing": "author",
"author_login": "<string>",
"base_branch": "<string>",
"base_sha": "<string>",
"ci_status": "pending",
"guide_outline": [
{
"paths": [
"<string>"
],
"title": "<string>"
}
],
"head_branch": "<string>",
"head_sha": "<string>",
"merged_at": "2023-11-07T05:31:56Z",
"origin_task": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"turn_count": 1
},
"pr_state": "open",
"severity_counts": {
"confirmed": 1,
"nit": 1,
"p1": 1,
"p2": 1,
"question": 1
},
"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>"
},
"summary_severity": "p1",
"verdict": "approve"
}
],
"next_cursor": "<string>"
}{
"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": "org_membership_required",
"error": "<string>"
}{
"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
reviews keeps the pull requests the organization's review runs reviewed, newest activity first (the later of the newest run and the merge); queue keeps the open ones among them, the ones whose newest run or posted verdict needs the caller first. Omitted is every pull request of a repository the organization has a non-archived project for, reviewed or not, newest opened first as GitHub orders them.
reviews, queue Keeps the pull requests of this project's repository, and the review runs of this project.
Comma-joined review-run statuses, matched against the latest run, the status the row displays; unreviewed matches a pull request with no runs, and only without a view.
^(reviewing|completed|failed|cancelled|superseded|archived|unreviewed)(,(reviewing|completed|failed|cancelled|superseded|archived|unreviewed))*$Comma-joined pull request states to keep; a pull request whose state the mirror has not recorded is in none. Omitted without a view is open alone.
^(open|closed|merged)(,(open|closed|merged))*$author keeps the pull requests the caller opened, by the GitHub login their connection stores or by one of their tasks publishing it; involved adds the ones they review, by that login.
author, involved The GitHub login that opened the pull request, case-insensitively.
^[A-Za-z0-9][A-Za-z0-9_-]*(\[[bB][oO][tT]\])?$A GitHub login with a user review request or a submitted review on the pull request, never its author, case-insensitively.
^[A-Za-z0-9][A-Za-z0-9_-]*(\[[bB][oO][tT]\])?$The repository owner's login, case-insensitively.
^[A-Za-z0-9][A-Za-z0-9_-]*(\[[bB][oO][tT]\])?$The repository name, case-insensitively.
^[A-Za-z0-9._-]+$Keeps pull requests opened at or after this UTC instant; one mirrored before Aether kept GitHub's open time is dated by when Aether first saw it.
^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(\.[0-9]{1,6})?Z$Keeps pull requests opened before this UTC instant; later than opened_after.
^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(\.[0-9]{1,6})?Z$Keeps pull requests GitHub last updated at or after this UTC instant.
^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(\.[0-9]{1,6})?Z$Keeps pull requests GitHub last updated before this UTC instant; later than updated_after.
^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(\.[0-9]{1,6})?Z$exclude leaves draft pull requests out.
exclude Trimmed; empty is no search. All digits, or # and digits, keeps the pull request with that number; anything else keeps the pull requests whose title holds its words in order, case-insensitively. Over 200 characters, or a number beyond a pull request number's range, is refused.
Keeps one section in the list's order; a cursor from any page of the same list pages inside it.
in_review, approved, other Pull requests per page; 20 when omitted.
1 <= x <= 100The previous page's next_cursor. A cursor minted for another view, organization, filter set or search is refused.