API reference
Get GitHub facts
What GitHub says about one of the account's repositories, through the account's installation of InOrbit's GitHub App: the default branch's sha, a pull request's head, state, mergeable and whether it merged, and the checks and statuses on its head with their conclusion and ci_ok. Each part says observed or why not (needs_permission names the GitHub permission to add) and carries an evidence id. Only the repositories listed for the account.
Needs scope connections: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.
org_id*stringThe account's id: org in GET /v1/me.
repository?stringThe repository, owner/name.
pull_number?stringA pull request's number; 0 reads the branch only.
int64branch?stringA branch; empty is the pull request's base, else the default branch.
iohr.connections.v1.GetGithubFactsResponse
application/json- response
iohr.connections.v1.GetGithubFactsResponse
branch?iohr.connections.v1.GithubBranch
checks?iohr.connections.v1.GithubChecks
default_branch*stringinstallation_id*stringint64observed_at*stringpull_request?iohr.connections.v1.GithubPullRequest
repository*stringrepository_observation?iohr.connections.v1.GithubObservation
import { ApiError, Public } from "@inorbithr/sdk";// Reads INORBIT_TOKEN, or INORBIT_KEY_ID and INORBIT_KEY_SECRET.const api = Public.fromEnv();try { const { value } = await api.connections.getGithubFacts("<org_id>"); console.log(value);} 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.
{ "branch": { "name": "string", "observation": { "detail": "string", "evidence_id": "string", "observed": true, "reason": "string" }, "sha": "string" }, "checks": { "ci_ok": true, "conclusion": "string", "runs": [ { "conclusion": "string", "name": "string", "status": "string", "url": "string" } ], "runs_observation": { "detail": "string", "evidence_id": "string", "observed": true, "reason": "string" }, "sha": "string", "statuses": [ { "conclusion": "string", "name": "string", "status": "string", "url": "string" } ], "statuses_observation": { "detail": "string", "evidence_id": "string", "observed": true, "reason": "string" } }, "default_branch": "string", "installation_id": "string", "observed_at": "string", "pull_request": { "base_ref": "string", "draft": true, "head_ref": "string", "head_sha": "string", "merge_commit_sha": "string", "mergeable": true, "mergeable_state": "string", "merged": true, "merged_into_default": true, "number": "string", "observation": { "detail": "string", "evidence_id": "string", "observed": true, "reason": "string" }, "state": "string", "title": "string", "url": "string" }, "repository": "string", "repository_observation": { "detail": "string", "evidence_id": "string", "observed": true, "reason": "string" }}Call a connection tool POST
Calls one tool from List your connection tools by name, with its arguments as a JSON object in `args_json`. Needs scope `connections:use`.
List monitors GET
The account's monitors, each with its connection, schedule, expectation, state and health (`up`, `down` or `unknown`). Needs scope `connections:read`.