API reference
List pull requests
The pull requests linked to a document, or to every document of a space, newest link first, with their state as last read from GitHub (title, author, draft, open, closed or merged, the review decision, the checks, when it merged and as which commit), the document each is on, and counts by state.
Needs scope decisions:read.
bearerAuthorizationBearer <token>An access token from the identity provider: a person's, or a customer's from the client credentials grant with an API key (developers.inorbit.hr). The gateway verifies it; the audience is iohr-api.
space_id*stringThe space.
document_id?stringThe document's id, or what people call it (RFC 0080.1, prd-39). Leave it out for the whole space.
repo?stringOnly this repository (owner/name).
state?stringOnly this state: unknown, draft, open, closed, merged, or active (draft and open).
page_size?integerFor the whole space: 0 means 50, at most 200.
int32page_token?stringcompact?booleanEach pull request as its id, repository, number, URL, state, title and document only.
iohr.decisions.v1.ListPullRequestsResponse
application/json- response
iohr.decisions.v1.ListPullRequestsResponse
counts?iohr.decisions.v1.PullRequestCounts
next_page_token*stringpull_requests*array<>import { ApiError, Public } from "@inorbithr/sdk";// Reads INORBIT_TOKEN, or INORBIT_KEY_ID and INORBIT_KEY_SECRET.const api = Public.fromEnv();try { for await (const pullRequest of api.decisions.allListPullRequestsGet("<space_id>")) { console.log(pullRequest); }} catch (e) { if (!(e instanceof ApiError)) throw e; console.error(`${e.code}: ${e.problem} (request id ${e.raw.requestId})`);}npm install @inorbithr/sdk. Calls the package's public surface; an operation newer than your package needs the next release or a client generated for your account. The SDKs.
{ "counts": { "closed": 0, "draft": 0, "failing": 0, "merged": 0, "open": 0, "total": 0, "unknown": 0 }, "next_page_token": "string", "pull_requests": [ { "author": "string", "checks": "string", "checks_failed": 0, "checks_passed": 0, "checks_pending": 0, "closed_at": "string", "document_id": "string", "document_kind": "string", "document_number": "string", "forge": "string", "linked_at": "string", "linked_by": "string", "merge_commit": "string", "merged_at": "string", "number": 0, "pull_request_id": "string", "refresh": "string", "refreshed_at": "string", "repo": "string", "review_decision": "string", "role": "string", "source": "string", "state": "string", "title": "string", "updated_at": "string", "url": "string", "via": "string" } ]}Stop listing a linked document DELETE
Stop listing a document in a space it was linked into. The document itself is untouched. Needs scope `decisions:write`.
List pull requests GET
The pull requests linked to a document, or to every document of a space, newest link first, with their state as last read from GitHub (title, author, draft, open, closed or merged, the review decision, the checks, when it merged and as which commit), the document each is on, and counts by state. Needs scope `decisions:read`.