{"components":{"schemas":{"AccessLevel":{"enum":["none","read","write"],"type":"string"},"Activity":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ActivityItem"},"type":"array"},"next_before":{"description":"Pass as `before` for the next page; `null` at the end.","format":"date-time","type":["string","null"]}},"required":["items"],"type":"object"},"ActivityCommit":{"properties":{"sha":{"type":"string"},"summary":{"type":"string"}},"required":["sha","summary"],"type":"object"},"ActivityItem":{"oneOf":[{"description":"Commits to one repository on one day.","properties":{"at":{"format":"date-time","type":"string"},"commits":{"description":"The newest few.","items":{"$ref":"#/components/schemas/ActivityCommit"},"type":"array"},"count":{"format":"int64","minimum":0,"type":"integer"},"date":{"type":"string"},"kind":{"enum":["commits"],"type":"string"},"repo":{"type":"string"}},"required":["repo","date","count","at","commits","kind"],"type":"object"},{"properties":{"at":{"format":"date-time","type":"string"},"kind":{"enum":["change_request_opened"],"type":"string"},"number":{"format":"int64","type":"integer"},"repo":{"type":"string"},"state":{"description":"Its state now.","type":"string"},"title":{"type":"string"}},"required":["repo","number","title","state","at","kind"],"type":"object"},{"properties":{"at":{"format":"date-time","type":"string"},"kind":{"enum":["change_request_merged"],"type":"string"},"number":{"format":"int64","type":"integer"},"repo":{"type":"string"},"title":{"type":"string"}},"required":["repo","number","title","at","kind"],"type":"object"},{"properties":{"at":{"format":"date-time","type":"string"},"kind":{"enum":["review"],"type":"string"},"number":{"format":"int64","type":"integer"},"repo":{"type":"string"},"title":{"type":"string"},"verdict":{"description":"`approve`, `request_changes` or `comment`","type":"string"}},"required":["repo","number","title","verdict","at","kind"],"type":"object"}]},"AnchorIn":{"properties":{"end_line":{"description":"The last line, inclusive; `line` by default.","format":"int32","type":["integer","null"]},"line":{"description":"The first line, 1-based.","format":"int32","type":"integer"},"path":{"type":"string"},"revision":{"description":"The revision the lines are in; the latest by default.","format":"int32","type":["integer","null"]},"side":{"description":"`new` (the head's version, by default) or `old` (the merge base's).","type":["string","null"]}},"required":["path","line"],"type":"object"},"AnchorOut":{"properties":{"end_line":{"format":"int32","type":"integer"},"line":{"format":"int32","type":"integer"},"path":{"type":"string"},"revision":{"format":"int32","type":"integer"},"side":{"type":"string"}},"required":["revision","path","side","line","end_line"],"type":"object"},"ApproveRequest":{"properties":{"add_ssh_key":{"description":"Add the SSH key the device offered for signing (true by default; ignored if it offered\nnone).","type":"boolean"}},"type":"object"},"ArmRequest":{"properties":{"commit_message":{"description":"For `merge` and `squash`: the rest of the message.","type":["string","null"]},"commit_title":{"description":"For `merge` and `squash`: the commit's title (a default names the request).","type":["string","null"]},"delete_branch":{"description":"Delete the head branch once merged.","type":"boolean"},"method":{"description":"`merge`, `squash` or `rebase`.","type":"string"}},"required":["method"],"type":"object"},"AutoMergeOut":{"properties":{"commit_message":{"type":["string","null"]},"commit_title":{"type":["string","null"]},"delete_branch":{"type":"boolean"},"enabled_at":{"format":"date-time","type":"string"},"enabled_by":{"description":"Who armed it: it merges as them.","type":["string","null"]},"method":{"description":"`merge`, `squash` or `rebase`.","type":"string"}},"required":["method","delete_branch","enabled_at"],"type":"object"},"BlameOut":{"properties":{"commits":{"description":"Each commit the ranges name, once.","items":{"$ref":"#/components/schemas/CommitOut"},"type":"array"},"path":{"type":"string"},"ranges":{"items":{"$ref":"#/components/schemas/BlameRange"},"type":"array"}},"required":["path","ranges","commits"],"type":"object"},"BlameRange":{"properties":{"commit":{"type":"string"},"end":{"description":"Last line, inclusive.","format":"int32","minimum":0,"type":"integer"},"start":{"description":"First line, 1-based, in the file at the requested commit.","format":"int32","minimum":0,"type":"integer"}},"required":["start","end","commit"],"type":"object"},"BlobOut":{"properties":{"binary":{"type":"boolean"},"language":{"type":["string","null"]},"lines":{"format":"int64","minimum":0,"type":["integer","null"]},"path":{"type":"string"},"sha":{"type":"string"},"size":{"format":"int64","minimum":0,"type":"integer"},"text":{"type":["string","null"]},"truncated":{"description":"Over `MAX_INLINE_BYTES`: `text` is left out; fetch the raw file.","type":"boolean"}},"required":["path","sha","size","binary","truncated"],"type":"object"},"BlobResponse":{"allOf":[{"$ref":"#/components/schemas/BlobOut"},{"properties":{"commit":{"$ref":"#/components/schemas/CommitOut"},"raw_url":{"description":"The raw bytes, from the API.","type":"string"}},"required":["commit","raw_url"],"type":"object"}]},"Blocker":{"description":"One reason a change request can't merge yet.","properties":{"details":{"description":"What it rests on, one line each: the runs, or the findings with where they are.","items":{"type":"string"},"type":"array"},"kind":{"description":"`checks` (CI on the head) or `review` (findings in the change).","type":"string"},"message":{"type":"string"},"pending":{"description":"It can clear by itself: CI still to run or finish, or the review still to be read.","type":"boolean"}},"required":["kind","pending","message","details"],"type":"object"},"BranchRuleList":{"properties":{"items":{"items":{"$ref":"#/components/schemas/BranchRuleOut"},"type":"array"}},"required":["items"],"type":"object"},"BranchRuleOut":{"properties":{"block_deletion":{"description":"Refuse deleting the branch. Implied by `block_force_push` and\n`require_change_request`: a protected branch deleted and pushed again could otherwise\ncarry any history.","type":"boolean"},"block_force_push":{"description":"Refuse pushes that are not fast-forwards.","type":"boolean"},"created_at":{"format":"date-time","type":"string"},"id":{"type":"string"},"pattern":{"description":"A branch name, or a glob: `*` within one path segment, `**` across segments.","type":"string"},"require_change_request":{"description":"Refuse direct pushes that update the branch (creating it is allowed).","type":"boolean"},"require_checks":{"description":"A change request into the branch merges only once every CI run on its head has passed.","type":"boolean"},"review_block_at":{"description":"`critical`, `high`, `medium`, `low` or `info`: a change request into the branch can't\nmerge while its review finds something at least this severe. Null: the review doesn't\nblock.","type":["string","null"]},"updated_at":{"format":"date-time","type":"string"}},"required":["id","pattern","block_force_push","block_deletion","require_change_request","require_checks","created_at","updated_at"],"type":"object"},"BranchRuleRequest":{"properties":{"block_deletion":{"type":"boolean"},"block_force_push":{"type":"boolean"},"pattern":{"type":"string"},"require_change_request":{"type":"boolean"},"require_checks":{"type":"boolean"},"review_block_at":{"description":"`critical` … `info`, or `off` (or left out): see [`BranchRuleOut::review_block_at`].","type":["string","null"]}},"required":["pattern"],"type":"object"},"BranchRuleUpdate":{"description":"Only the fields given change.","properties":{"block_deletion":{"type":["boolean","null"]},"block_force_push":{"type":["boolean","null"]},"require_change_request":{"type":["boolean","null"]},"require_checks":{"type":["boolean","null"]},"review_block_at":{"description":"`critical` … `info`, or `off` to stop the review blocking.","type":["string","null"]}},"type":"object"},"BranchSide":{"properties":{"ref":{"description":"The branch name.","type":"string"},"sha":{"description":"Where it stood at the request's last update.","type":"string"}},"required":["ref","sha"],"type":"object"},"Category":{"enum":["breaking","data_leak","security","efficiency","convention","correctness","testing"],"type":"string"},"Changed":{"description":"A fact whose key is in both versions with a different value.","properties":{"after":{"type":"string"},"before":{"type":"string"},"key":{"type":"string"},"kind":{"$ref":"#/components/schemas/FactKind"},"line_after":{"format":"int32","minimum":0,"type":"integer"},"line_before":{"format":"int32","minimum":0,"type":"integer"}},"required":["kind","key","before","after","line_before","line_after"],"type":"object"},"Check":{"properties":{"backend":{"description":"For the database: `sqlite` or `postgres`.","type":["string","null"]},"latency_ms":{"format":"int64","minimum":0,"type":"integer"},"status":{"description":"`ok` or `failing`. Causes are logged, not returned.","type":"string"}},"required":["status","latency_ms"],"type":"object"},"ClientInfo":{"properties":{"arch":{"type":"string"},"host":{"type":"string"},"os":{"type":"string"},"version":{"type":"string"}},"type":"object"},"CloneAccess":{"properties":{"token":{"description":"`lorx_jt_…`: read access to this repository's code while the job runs. Send it as\n`Authorization: Bearer`, never in the URL.","type":"string"},"url":{"description":"Fetch the commit from here, over HTTPS.","type":"string"}},"required":["url","token"],"type":"object"},"CloneUrls":{"properties":{"https":{"description":"`https://<host>/{owner}/{repo}.git`","type":"string"},"ssh":{"description":"`git@<host>:{owner}/{repo}.git`, or `ssh://git@<host>:<port>/{owner}/{repo}.git` off\nport 22. Absent when the server does not serve git over SSH.","type":["string","null"]}},"required":["https"],"type":"object"},"CloseRequest":{"properties":{"reason":{"description":"Shown on the timeline.","type":["string","null"]}},"type":"object"},"CommentOut":{"properties":{"author":{"type":["string","null"]},"body":{"description":"Empty once deleted.","type":"string"},"created_at":{"format":"date-time","type":"string"},"deleted":{"type":"boolean"},"edited_at":{"format":"date-time","type":["string","null"]},"id":{"type":"string"},"imported":{"oneOf":[{"$ref":"#/components/schemas/ImportedOut","description":"Imported from another forge: who wrote it there (`author` is then null)."},{"type":"null"}]},"review":{"description":"Written as part of this review.","type":["string","null"]}},"required":["id","body","deleted","created_at"],"type":"object"},"CommitDetail":{"properties":{"additions":{"format":"int32","minimum":0,"type":"integer"},"commit":{"$ref":"#/components/schemas/CommitOut"},"deletions":{"format":"int32","minimum":0,"type":"integer"},"files":{"items":{"$ref":"#/components/schemas/DiffFile"},"type":"array"},"files_truncated":{"description":"More files changed than are listed (over 3,000).","type":"boolean"}},"required":["commit","additions","deletions","files","files_truncated"],"type":"object"},"CommitList":{"properties":{"items":{"items":{"$ref":"#/components/schemas/CommitOut"},"type":"array"},"next_cursor":{"type":["string","null"]}},"required":["items"],"type":"object"},"CommitOut":{"properties":{"author":{"$ref":"#/components/schemas/Signature"},"body":{"description":"The rest of the message, after the blank line.","type":"string"},"committer":{"$ref":"#/components/schemas/Signature"},"parents":{"items":{"type":"string"},"type":"array"},"sha":{"type":"string"},"short_sha":{"type":"string"},"signature":{"oneOf":[{"$ref":"#/components/schemas/SignatureOut","description":"The commit's signature and whether it is verified (`null` when unsigned)."},{"type":"null"}]},"summary":{"description":"The first line of the message.","type":"string"}},"required":["sha","short_sha","parents","summary","body","author","committer"],"type":"object"},"Community":{"properties":{"code_of_conduct":{"oneOf":[{"$ref":"#/components/schemas/CommunityFile"},{"type":"null"}]},"commit":{"description":"The commit these were read at.","type":"string"},"contributing":{"oneOf":[{"$ref":"#/components/schemas/CommunityFile"},{"type":"null"}]},"license":{"oneOf":[{"$ref":"#/components/schemas/License"},{"type":"null"}]},"readme":{"oneOf":[{"$ref":"#/components/schemas/CommunityFile"},{"type":"null"}]},"security":{"oneOf":[{"$ref":"#/components/schemas/CommunityFile"},{"type":"null"}]}},"required":["commit"],"type":"object"},"CommunityFile":{"properties":{"path":{"description":"Its path in the repository, `/`-separated.","type":"string"}},"required":["path"],"type":"object"},"Comparison":{"properties":{"ahead":{"description":"Commits in `head` that `base` does not have.","format":"int64","minimum":0,"type":"integer"},"base":{"type":"string"},"behind":{"description":"Commits in `base` that `head` does not have.","format":"int64","minimum":0,"type":"integer"},"commits":{"description":"The first 250 of the `ahead` commits, oldest first.","items":{"$ref":"#/components/schemas/CommitOut"},"type":"array"},"files":{"items":{"$ref":"#/components/schemas/DiffFile"},"type":"array"},"files_truncated":{"description":"More files changed than are listed.","type":"boolean"},"head":{"type":"string"},"merge_base":{"description":"None when the two share no history.","type":["string","null"]}},"required":["base","head","ahead","behind","commits","files","files_truncated"],"type":"object"},"CompleteRequest":{"properties":{"name":{"description":"Your name; GitHub's by default.","type":["string","null"]},"token":{"description":"The `github_token` from the redirect to `/register`.","type":"string"},"username":{"type":"string"}},"required":["token","username"],"type":"object"},"ConflictFile":{"properties":{"base":{"description":"The merge base's text (absent if the file was added on both sides).","type":["string","null"]},"binary":{"description":"Not text (or a submodule): resolve by taking a side (`take`) or deleting it.","type":"boolean"},"hunks":{"items":{"$ref":"#/components/schemas/ConflictHunk"},"type":"array"},"merged":{"description":"The merged text with diff3 markers, as `git merge` leaves it.","type":["string","null"]},"ours":{"description":"The head's text (absent if the head deleted it).","type":["string","null"]},"path":{"type":"string"},"theirs":{"description":"The base branch's text (absent if the base branch deleted it).","type":["string","null"]},"too_large":{"description":"Too large to send inline: resolve by taking a side (`take`) or deleting it.","type":"boolean"},"unresolvable_here":{"description":"Its name is not valid UTF-8 (shown here with replacement characters): resolve it\nlocally, not through the API.","type":"boolean"}},"required":["path","hunks","binary","too_large","unresolvable_here"],"type":"object"},"ConflictHunk":{"properties":{"base":{"description":"The merge base's lines.","items":{"type":"string"},"type":"array"},"line":{"description":"Where the hunk starts in `merged`, 1-based.","format":"int32","minimum":0,"type":"integer"},"ours":{"description":"The head's lines.","items":{"type":"string"},"type":"array"},"theirs":{"description":"The base branch's lines.","items":{"type":"string"},"type":"array"}},"required":["line","ours","base","theirs"],"type":"object"},"Conflicts":{"properties":{"base_sha":{"type":"string"},"files":{"items":{"$ref":"#/components/schemas/ConflictFile"},"type":"array"},"head_sha":{"description":"The head and base the conflicts are for: pass them back when resolving.","type":"string"},"state":{"description":"`clean`, `conflicts` or `unrelated`","type":"string"},"truncated":{"description":"More files conflict than are listed (over 300); resolve locally.","type":"boolean"}},"required":["head_sha","base_sha","state","files","truncated"],"type":"object"},"ContributedRepo":{"properties":{"commits":{"description":"Commits in the range.","format":"int64","minimum":0,"type":"integer"},"description":{"type":"string"},"full_name":{"description":"`owner/name`","type":"string"},"last_commit_at":{"description":"The latest of them.","format":"date-time","type":"string"},"name":{"type":"string"},"owner":{"type":"string"},"visibility":{"description":"`public` or `private`","type":"string"}},"required":["full_name","owner","name","visibility","description","commits","last_commit_at"],"type":"object"},"ContributionDay":{"properties":{"count":{"format":"int64","minimum":0,"type":"integer"},"date":{"description":"`YYYY-MM-DD`: the author's own day for commits, UTC for the rest.","type":"string"}},"required":["date","count"],"type":"object"},"Contributions":{"properties":{"change_requests":{"format":"int64","minimum":0,"type":"integer"},"commits":{"format":"int64","minimum":0,"type":"integer"},"days":{"description":"Days with at least one contribution, in order.","items":{"$ref":"#/components/schemas/ContributionDay"},"type":"array"},"from":{"type":"string"},"repos":{"description":"The repositories committed to in the range, most recently first.","items":{"$ref":"#/components/schemas/ContributedRepo"},"type":"array"},"reviews":{"format":"int64","minimum":0,"type":"integer"},"to":{"type":"string"},"total":{"description":"Everything below, added up.","format":"int64","minimum":0,"type":"integer"},"username":{"type":"string"}},"required":["username","from","to","total","commits","change_requests","reviews","days","repos"],"type":"object"},"CrCommits":{"properties":{"items":{"description":"The head's commits that the base does not have, oldest first (the first 250).","items":{"$ref":"#/components/schemas/CommitOut"},"type":"array"},"total":{"description":"How many there are in all.","format":"int64","minimum":0,"type":"integer"}},"required":["items","total"],"type":"object"},"CrDetail":{"allOf":[{"$ref":"#/components/schemas/CrSummary"},{"properties":{"auto_merge":{"oneOf":[{"$ref":"#/components/schemas/AutoMergeOut","description":"Armed to merge itself once everything required of it passes."},{"type":"null"}]},"body":{"type":"string"},"merge_base":{"description":"`None` when the head and base share no history.","type":["string","null"]},"merge_blockers":{"description":"What the base's branch rules still want before it can merge (HAL-1504): CI to pass on\nthe head, the review to find nothing at their severity. Empty: nothing in the gate\nstops it. Open requests only; a `change_request_updated` event follows when a CI run on\nthe head finishes.","items":{"$ref":"#/components/schemas/Blocker"},"type":"array"},"merge_sha":{"description":"The base's tip when the request was merged.","type":["string","null"]},"mergeable":{"oneOf":[{"$ref":"#/components/schemas/MergeableOut","description":"Whether it merges cleanly into its base, for the head and base it has now (open\nrequests only; a `change_request_mergeability` event follows each new answer)."},{"type":"null"}]},"merged_by":{"type":["string","null"]},"revisions":{"items":{"$ref":"#/components/schemas/RevisionOut"},"type":"array"},"timeline":{"items":{"$ref":"#/components/schemas/TimelineEntry"},"type":"array"},"viewer":{"$ref":"#/components/schemas/CrViewer"}},"required":["body","revisions","timeline","merge_blockers","viewer"],"type":"object"}]},"CrFiles":{"properties":{"additions":{"format":"int32","minimum":0,"type":"integer"},"deletions":{"format":"int32","minimum":0,"type":"integer"},"files":{"items":{"$ref":"#/components/schemas/DiffFile"},"type":"array"},"files_truncated":{"description":"More files changed than are listed (over 3,000).","type":"boolean"},"from":{"description":"What the files are compared against: the merge base, or the earlier revision's head.","type":"string"},"revision":{"format":"int32","type":"integer"},"to":{"type":"string"}},"required":["revision","from","to","additions","deletions","files","files_truncated"],"type":"object"},"CrList":{"properties":{"items":{"items":{"$ref":"#/components/schemas/CrSummary"},"type":"array"},"next_cursor":{"type":["string","null"]},"totals":{"$ref":"#/components/schemas/CrTotalsOut","description":"Counts per state for the same filters (whatever `state` asked for)."}},"required":["items","totals"],"type":"object"},"CrSummary":{"properties":{"author":{"type":["string","null"]},"base":{"$ref":"#/components/schemas/BranchSide"},"closed_at":{"format":"date-time","type":["string","null"]},"created_at":{"format":"date-time","type":"string"},"head":{"$ref":"#/components/schemas/HeadSide"},"imported":{"oneOf":[{"$ref":"#/components/schemas/ImportedOut","description":"Imported from another forge: who opened it there, and the original (`author` is then\nnull)."},{"type":"null"}]},"merged_at":{"format":"date-time","type":["string","null"]},"number":{"format":"int64","type":"integer"},"state":{"description":"`open`, `draft`, `merged` or `closed`","type":"string"},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"required":["number","title","state","base","head","created_at","updated_at"],"type":"object"},"CrTotalsOut":{"properties":{"closed":{"format":"int64","minimum":0,"type":"integer"},"merged":{"format":"int64","minimum":0,"type":"integer"},"open":{"format":"int64","minimum":0,"type":"integer"}},"required":["open","merged","closed"],"type":"object"},"CrViewer":{"properties":{"can_edit":{"description":"Edit the title, body, draft state and base; close and reopen.","type":"boolean"}},"required":["can_edit"],"type":"object"},"CreatedToken":{"properties":{"secret":{"description":"Shown once. Store it now: it cannot be retrieved again.","type":"string"},"token":{"$ref":"#/components/schemas/TokenOut"}},"required":["token","secret"],"type":"object"},"CsrfToken":{"properties":{"token":{"description":"Send this in the `x-csrf-token` header on every POST, PUT, PATCH and DELETE.","type":"string"}},"required":["token"],"type":"object"},"DeleteFileRequest":{"properties":{"branch":{"type":["string","null"]},"message":{"description":"`Delete {path}` by default.","type":["string","null"]},"path":{"type":"string"},"sha":{"description":"The blob being removed: refused if the file has changed since.","type":"string"}},"required":["path","sha"],"type":"object"},"DeviceClientOut":{"properties":{"arch":{"type":"string"},"host":{"type":"string"},"id":{"type":"string"},"name":{"description":"From the server's registry of clients, not from the device.","type":"string"},"os":{"type":"string"},"version":{"description":"The rest is what the device says about itself.","type":"string"}},"required":["id","name","version","host","os","arch"],"type":"object"},"DeviceCodeRequest":{"properties":{"client":{"oneOf":[{"$ref":"#/components/schemas/ClientInfo","description":"JSON form: what the device says about itself (its name is taken from `client_id`)."},{"type":"null"}]},"client_arch":{"type":["string","null"]},"client_host":{"type":["string","null"]},"client_id":{"description":"`bit` or `lorx-mobile`.","type":"string"},"client_os":{"type":["string","null"]},"client_version":{"description":"Form-encoded equivalents of `client`.","type":["string","null"]},"scope":{"description":"Space-separated scopes requested. Informational: a device always receives the device\ncapabilities (see the module docs).","type":["string","null"]},"ssh_signing_key":{"description":"The device's public SSH key (`ssh-ed25519 AAAA…`), offered for signing commits. The\napproval page shows its fingerprint and the person decides whether to add it.","type":["string","null"]}},"required":["client_id"],"type":"object"},"DeviceCodeResponse":{"properties":{"device_code":{"description":"Secret: keep it on the device and poll with it.","type":"string"},"expires_in":{"format":"int64","type":"integer"},"interval":{"description":"Poll no more often than this many seconds.","format":"int32","type":"integer"},"user_code":{"description":"Show this: `WDJB-MJHT`.","type":"string"},"verification_uri":{"type":"string"},"verification_uri_complete":{"description":"The same page with the code filled in.","type":"string"}},"required":["device_code","user_code","verification_uri","verification_uri_complete","expires_in","interval"],"type":"object"},"DeviceRequestOut":{"properties":{"asked_at":{"format":"date-time","type":"string"},"cannot":{"description":"What it can never do: `settings`, `secrets`, `access`.","items":{"type":"string"},"type":"array"},"client":{"$ref":"#/components/schemas/DeviceClientOut"},"expires_at":{"format":"date-time","type":"string"},"ip":{"description":"The address the request came from.","type":["string","null"]},"requested_capabilities":{"description":"What approving grants: `code:write`, `change_requests:write`, `review`, `runs:write`,\n`ssh_signing_key`.","items":{"type":"string"},"type":"array"},"same_address_as_you":{"description":"Whether it came from the same address as you. If not, and you did not just run\n`bit auth login` somewhere else, someone may be trying to get you to approve their device.","type":"boolean"},"ssh_key_fingerprint":{"description":"The SHA-256 fingerprint of the SSH key the device offers for signing, if any.","type":["string","null"]},"user_code":{"description":"`WDJB-MJHT`","type":"string"}},"required":["user_code","client","requested_capabilities","cannot","asked_at","expires_at","same_address_as_you"],"type":"object"},"DiffFile":{"properties":{"additions":{"format":"int32","minimum":0,"type":"integer"},"binary":{"type":"boolean"},"deletions":{"format":"int32","minimum":0,"type":"integer"},"hunks":{"items":{"$ref":"#/components/schemas/DiffHunk"},"type":"array"},"hunks_omitted":{"description":"The file's hunks were left out: the diff ran past the inline limit, or the file's own\ndiff is too long to show. Fetch them with `?file=`.","type":"boolean"},"large":{"description":"Too large to diff (over 1 MB on either side): no line counts, no hunks.","type":"boolean"},"old_path":{"type":["string","null"]},"path":{"type":"string"},"status":{"description":"`added`, `modified`, `deleted` or `renamed`","type":"string"}},"required":["path","status","additions","deletions","binary","hunks_omitted","hunks"],"type":"object"},"DiffHunk":{"properties":{"header":{"description":"`@@ -a,b +c,d @@`","type":"string"},"lines":{"items":{"$ref":"#/components/schemas/DiffLine"},"type":"array"}},"required":["header","lines"],"type":"object"},"DiffLine":{"properties":{"kind":{"description":"`ctx`, `add` or `del`","type":"string"},"new":{"description":"Line number in the new file (context and additions).","format":"int32","minimum":0,"type":["integer","null"]},"no_newline":{"description":"The file ends here without a newline (git's \"\\\\ No newline at end of file\").","type":"boolean"},"old":{"description":"Line number in the old file (context and deletions).","format":"int32","minimum":0,"type":["integer","null"]},"text":{"description":"The line's text, without its line ending (a carriage return before it is kept).","type":"string"}},"required":["kind","text"],"type":"object"},"DrainRequest":{"properties":{"draining":{"description":"True: finish the job it holds and take no more. False: take jobs again.","type":"boolean"}},"required":["draining"],"type":"object"},"EditCommentRequest":{"properties":{"body":{"type":"string"}},"required":["body"],"type":"object"},"EditCrRequest":{"properties":{"base":{"description":"A new base branch.","type":["string","null"]},"body":{"type":["string","null"]},"draft":{"description":"`true` to make it a draft again, `false` to mark it ready for review.","type":["boolean","null"]},"title":{"type":["string","null"]}},"type":"object"},"EmailRequest":{"properties":{"email":{"type":"string"}},"required":["email"],"type":"object"},"ErrorBody":{"properties":{"error":{"$ref":"#/components/schemas/ErrorDetail"}},"required":["error"],"type":"object"},"ErrorDetail":{"properties":{"code":{"description":"Stable, machine-readable: `not_found`, `unauthenticated`, `internal`, …","example":"not_found","type":"string"},"fields":{"additionalProperties":{"type":"string"},"description":"For `validation_failed`: a message per invalid field.","propertyNames":{"type":"string"},"type":["object","null"]},"message":{"description":"Human-readable explanation.","type":"string"},"request_id":{"description":"Matches the `x-request-id` response header and the server logs.","example":"req_3f9a1c0b7d2e","type":"string"},"retry_after":{"description":"For `rate_limited`: seconds until trying again is worthwhile.","format":"int64","minimum":0,"type":["integer","null"]}},"required":["code","message","request_id"],"type":"object"},"Evidence":{"description":"Why a finding is true, in a form that can be checked.","oneOf":[{"description":"A fact that changed (or appeared, or went), before and after.","properties":{"after":{"type":["string","null"]},"before":{"type":["string","null"]},"key":{"type":"string"},"kind":{"$ref":"#/components/schemas/FactKind"},"type":{"enum":["fact_change"],"type":"string"}},"required":["kind","key","type"],"type":"object"},{"description":"Code as it stands at a place.","properties":{"at":{"$ref":"#/components/schemas/Location"},"text":{"type":"string"},"type":{"enum":["code"],"type":"string"}},"required":["at","text","type"],"type":"object"},{"description":"A path data takes, source to sink.","properties":{"steps":{"items":{"$ref":"#/components/schemas/Location"},"type":"array"},"type":{"enum":["flow"],"type":"string"}},"required":["steps","type"],"type":"object"},{"description":"Places that use what changed.","properties":{"at":{"items":{"$ref":"#/components/schemas/Location"},"type":"array"},"type":{"enum":["users"],"type":"string"}},"required":["at","type"],"type":"object"},{"description":"A test that fails because of the problem.","properties":{"name":{"type":"string"},"output":{"type":"string"},"type":{"enum":["failing_test"],"type":"string"}},"required":["name","output","type"],"type":"object"},{"description":"A measurement: base and head, with the interval the difference lies in.","properties":{"base":{"format":"double","type":"number"},"head":{"format":"double","type":"number"},"interval":{"items":false,"prefixItems":[{"format":"double","type":"number"},{"format":"double","type":"number"}],"type":["array","null"]},"metric":{"type":"string"},"type":{"enum":["measurement"],"type":"string"}},"required":["metric","base","head","type"],"type":"object"},{"description":"An existing tool's result (clippy, cargo-semver-checks, ...).","properties":{"message":{"type":"string"},"rule":{"type":"string"},"tool":{"type":"string"},"type":{"enum":["tool"],"type":"string"}},"required":["tool","rule","message","type"],"type":"object"},{"description":"What the repository's review history says.","properties":{"note":{"type":"string"},"type":{"enum":["history"],"type":"string"}},"required":["note","type"],"type":"object"}]},"Fact":{"description":"One thing known about a file.","properties":{"key":{"description":"Unique within a file and kind.","type":"string"},"kind":{"$ref":"#/components/schemas/FactKind"},"line":{"description":"1-based line where it starts, for pointing at it. Not part of its identity: moving code\ndoes not change its facts.","format":"int32","minimum":0,"type":"integer"},"value":{"type":"string"}},"required":["kind","key","value","line"],"type":"object"},"FactDiff":{"description":"The fact diff of a whole change: one entry per file whose facts differ.","properties":{"files":{"items":{"$ref":"#/components/schemas/FileDiff"},"type":"array"}},"required":["files"],"type":"object"},"FactKind":{"description":"What a fact is about. Facts are listed in this order.","enum":["symbol","public_api","import","call","complexity","query","query_table","table","column","migration","route","api_schema","api_field","directive","sink","secret","dynamic_sql","dynamic_shell","loop_call","nested_loop"],"type":"string"},"FileDiff":{"properties":{"added":{"items":{"$ref":"#/components/schemas/Fact"},"type":"array"},"blob_after":{"type":["string","null"]},"blob_before":{"type":["string","null"]},"changed":{"items":{"$ref":"#/components/schemas/Changed"},"type":"array"},"path":{"type":"string"},"possibly_added":{"items":{"$ref":"#/components/schemas/Fact"},"type":"array"},"possibly_removed":{"description":"Facts missing from a version the parser could only partly read: the code may still be\nthere, so these are not reported as removed (or, the other way round, added).","items":{"$ref":"#/components/schemas/Fact"},"type":"array"},"removed":{"items":{"$ref":"#/components/schemas/Fact"},"type":"array"},"status":{"$ref":"#/components/schemas/FileStatus"},"unreadable":{"description":"A version was not read at all (too large, not UTF-8), so nothing is compared: an\nunread file has no facts, and that would look like everything in it was deleted.","type":["string","null"]}},"required":["path","status","added","removed","changed","possibly_removed","possibly_added"],"type":"object"},"FileStatus":{"enum":["added","deleted","modified"],"type":"string"},"FileWritten":{"properties":{"branch":{"type":"string"},"commit":{"description":"The new commit, now the branch's tip.","type":"string"},"path":{"type":"string"},"sha":{"description":"The file's blob; absent when it was deleted.","type":["string","null"]}},"required":["path","branch","commit"],"type":"object"},"Finding":{"properties":{"at":{"$ref":"#/components/schemas/Location"},"category":{"$ref":"#/components/schemas/Category"},"evidence":{"description":"Never empty.","items":{"$ref":"#/components/schemas/Evidence"},"type":"array"},"fix":{"oneOf":[{"$ref":"#/components/schemas/Patch"},{"type":"null"}]},"id":{"description":"Stable across runs and reformatting: the rule, the file and what the finding is about.","type":"string"},"message":{"type":"string"},"rule":{"description":"`builtin:<detector>`, `rule:<id>@<version>`, `tool:<tool>/<rule>` or `ai:<model>`.","type":"string"},"severity":{"$ref":"#/components/schemas/Severity"}},"required":["id","rule","category","severity","at","message","evidence"],"type":"object"},"FinishRequest":{"properties":{"outcome":{"description":"`passed`, `cached`, `failed` or `cancelled`.","type":"string"},"result":{"description":"The steps' outcomes and any error (lorx-actions' `JobResult`), stored as it is.","type":"object"}},"required":["outcome","result"],"type":"object"},"HeadSide":{"properties":{"deleted":{"description":"The branch was deleted; the request keeps its last state.","type":"boolean"},"ref":{"type":"string"},"sha":{"type":"string"}},"required":["ref","sha","deleted"],"type":"object"},"Health":{"properties":{"database":{"$ref":"#/components/schemas/Check"},"instance_id":{"description":"This installation's id, created on first start.","type":["string","null"]},"status":{"description":"`ok` when every check passes, `degraded` otherwise.","example":"ok","type":"string"},"storage":{"$ref":"#/components/schemas/Check"},"uptime_seconds":{"format":"int64","minimum":0,"type":"integer"},"version":{"description":"Server version.","example":"0.0.1","type":"string"}},"required":["status","version","uptime_seconds","database","storage"],"type":"object"},"Heartbeat":{"properties":{"continue":{"description":"False: the job was cancelled or given to another runner. Stop it now.","type":"boolean"},"lease_until":{"format":"date-time","type":["string","null"]}},"required":["continue"],"type":"object"},"IdentityList":{"properties":{"items":{"items":{"$ref":"#/components/schemas/IdentityOut"},"type":"array"}},"required":["items"],"type":"object"},"IdentityOut":{"properties":{"created_at":{"format":"date-time","type":"string"},"email":{"type":["string","null"]},"id":{"type":"string"},"last_used_at":{"format":"date-time","type":["string","null"]},"login":{"type":"string"},"provider":{"description":"`github`","type":"string"}},"required":["id","provider","login","created_at"],"type":"object"},"ImportComment":{"properties":{"author":{"type":"string"},"body":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"in_reply_to_url":{"description":"The comment it answers (that comment's `url`).","type":["string","null"]},"line":{"format":"int32","type":["integer","null"]},"path":{"description":"On a line of the diff: the file, `new` or `old`, and the line (or lines).","type":["string","null"]},"review_url":{"description":"The review it belongs to (the review's `url`).","type":["string","null"]},"side":{"type":["string","null"]},"start_line":{"format":"int32","type":["integer","null"]},"url":{"type":"string"}},"required":["url","author","body","created_at"],"type":"object"},"ImportPull":{"properties":{"author":{"description":"Who opened it (GitHub login).","type":"string"},"base_ref":{"type":"string"},"base_sha":{"type":"string"},"body":{"type":"string"},"closed_at":{"format":"date-time","type":["string","null"]},"comments":{"items":{"$ref":"#/components/schemas/ImportComment"},"type":"array"},"created_at":{"format":"date-time","type":"string"},"head_ref":{"type":"string"},"head_sha":{"description":"Must be in the repository already: push it to `refs/imported/pull/<n>/head` first.","type":"string"},"merge_sha":{"type":["string","null"]},"merged_at":{"format":"date-time","type":["string","null"]},"merged_by":{"type":["string","null"]},"number":{"format":"int64","type":"integer"},"reviews":{"items":{"$ref":"#/components/schemas/ImportReview"},"type":"array"},"state":{"description":"`open`, `draft`, `closed` or `merged`","type":"string"},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"url":{"description":"Its page on GitHub.","type":"string"}},"required":["number","url","author","title","state","base_ref","head_ref","base_sha","head_sha","created_at","updated_at"],"type":"object"},"ImportRequest":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ImportPull"},"type":"array"},"provider":{"description":"`github`","type":"string"}},"required":["provider","items"],"type":"object"},"ImportResult":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ImportedItem"},"type":"array"}},"required":["items"],"type":"object"},"ImportReview":{"properties":{"author":{"type":"string"},"body":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"url":{"type":"string"},"verdict":{"description":"`approve`, `request_changes` or `comment`","type":"string"}},"required":["url","author","verdict","created_at"],"type":"object"},"ImportedItem":{"properties":{"comments_added":{"minimum":0,"type":"integer"},"error":{"description":"Why it was refused.","type":["string","null"]},"number":{"format":"int64","type":"integer"},"reviews_added":{"minimum":0,"type":"integer"},"status":{"description":"`created`, `updated` or `refused`","type":"string"}},"required":["number","status","comments_added","reviews_added"],"type":"object"},"ImportedOut":{"description":"Imported from another forge (HAL-1594): who wrote it there, and where it was.","properties":{"from":{"description":"The original, when known.","type":["string","null"]},"login":{"description":"Their name there.","type":"string"},"profile_url":{"description":"Their profile there.","type":"string"},"provider":{"description":"`github`","type":"string"}},"required":["provider","login","profile_url"],"type":"object"},"JobLog":{"properties":{"finished":{"description":"Whether the job has finished (no more lines will come).","type":"boolean"},"lines":{"items":{"$ref":"#/components/schemas/LogLine"},"type":"array"}},"required":["lines","finished"],"type":"object"},"JobOut":{"properties":{"attempt":{"format":"int32","type":"integer"},"error":{"description":"Why it failed or did not run.","type":["string","null"]},"finished_at":{"format":"date-time","type":["string","null"]},"id":{"type":"string"},"image":{"type":["string","null"]},"job":{"type":"string"},"key":{"description":"The instance: `test (os=linux)`.","type":"string"},"level":{"format":"int32","type":"integer"},"needs":{"items":{"type":"string"},"type":"array"},"queued_at":{"format":"date-time","type":["string","null"]},"ran_on":{"description":"The name of the runner that took it (its last attempt's), while that runner exists.","type":["string","null"]},"runner":{"description":"The `runner:` labels the job asks for.","type":["string","null"]},"started_at":{"format":"date-time","type":["string","null"]},"status":{"description":"`waiting`, `queued`, `running`, `passed`, `cached`, `failed`, `cancelled` or `not_run`","type":"string"},"steps":{"items":{"$ref":"#/components/schemas/StepOut"},"type":"array"}},"required":["id","key","job","level","needs","status","attempt","steps"],"type":"object"},"KeyList":{"properties":{"items":{"items":{"$ref":"#/components/schemas/KeyOut"},"type":"array"}},"required":["items"],"type":"object"},"KeyOut":{"properties":{"algorithm":{"description":"`ssh-ed25519`, `ecdsa-sha2-nistp256`, `ssh-rsa`, …","type":"string"},"created_at":{"format":"date-time","type":"string"},"fingerprint":{"description":"`SHA256:…`, as `ssh-keygen -lf` prints it.","type":"string"},"id":{"type":"string"},"last_used_at":{"description":"Last used to push or fetch over SSH.","format":"date-time","type":["string","null"]},"name":{"type":"string"},"public_key":{"description":"The public key, `<algorithm> <base64>`.","type":"string"},"usage":{"$ref":"#/components/schemas/KeyUsage"}},"required":["id","name","usage","algorithm","fingerprint","public_key","created_at"],"type":"object"},"KeyUsage":{"enum":["auth","signing","both"],"type":"string"},"LanguageShare":{"properties":{"bytes":{"format":"int64","minimum":0,"type":"integer"},"name":{"type":"string"},"percent":{"description":"Of all the bytes counted, to one decimal place.","format":"double","type":"number"}},"required":["name","bytes","percent"],"type":"object"},"LastCommit":{"properties":{"at":{"format":"date-time","type":"string"},"author":{"type":"string"},"sha":{"type":"string"},"summary":{"type":"string"}},"required":["sha","summary","author","at"],"type":"object"},"LeaseRequest":{"properties":{"arch":{"type":"string"},"labels":{"description":"Its labels now (its os and arch are always among them).","items":{"type":"string"},"type":"array"},"os":{"type":"string"},"version":{"type":"string"},"wait_secs":{"description":"How long to wait for a job, up to 30 seconds (0: answer at once).","format":"int64","minimum":0,"type":"integer"}},"required":["os","arch","version"],"type":"object"},"LeasedJob":{"properties":{"attempt":{"description":"Which attempt this is (a job whose runner stopped answering is tried again).","format":"int32","type":"integer"},"clone":{"$ref":"#/components/schemas/CloneAccess"},"heartbeat_every_secs":{"format":"int64","minimum":0,"type":"integer"},"id":{"type":"string"},"key":{"description":"The job instance: `test (os=linux)`.","type":"string"},"lease_until":{"format":"date-time","type":"string"},"run":{"$ref":"#/components/schemas/LeasedRun"},"spec":{"description":"What to run: steps, env, image, timeout (lorx-actions' `JobSpec`).","type":"object"}},"required":["id","attempt","key","spec","run","clone","lease_until","heartbeat_every_secs"],"type":"object"},"LeasedRun":{"properties":{"base":{"description":"What a review of this run compares against: a push's previous head, or where a new\nbranch left the default branch. Fetch it beside `commit`; it reaches steps as\n`LORX_BASE`. None for runs with nothing to compare against (started by hand, or the\ndefault branch's first push).","type":["string","null"]},"branch":{"type":["string","null"]},"commit":{"type":"string"},"id":{"type":"string"},"number":{"format":"int64","type":"integer"},"repo":{"description":"`owner/name`.","type":"string"},"trigger":{"type":"string"},"workflow":{"type":"string"}},"required":["id","number","workflow","repo","commit","trigger"],"type":"object"},"License":{"properties":{"name":{"description":"For display: `MIT License`, `Apache License 2.0`, or `Other` when it is not one we know.","type":"string"},"path":{"type":"string"},"spdx_id":{"description":"The SPDX identifier (`MIT`, `Apache-2.0`, ...); `null` for a licence we cannot name.","type":["string","null"]}},"required":["path","name"],"type":"object"},"LiveOut":{"description":"What each event's `data` is.","properties":{"at":{"format":"date-time","type":"string"},"change":{"description":"For a push: `created`, `deleted`, `forced` or `updated`.","type":["string","null"]},"event":{"description":"The event itself.","type":"object"},"kind":{"description":"`push`, `change_request_opened`, `change_request_updated`, `run_created`, `run_updated`,\n`job_queued`, `job_started`, `job_finished`, …","type":"string"},"repo":{"description":"`owner/name`","type":["string","null"]},"seq":{"format":"int64","type":"integer"}},"required":["seq","kind","at","event"],"type":"object"},"Location":{"properties":{"line":{"description":"1-based; 0 when the finding is about the file as a whole.","format":"int32","minimum":0,"type":"integer"},"path":{"type":"string"}},"required":["path","line"],"type":"object"},"LogLine":{"properties":{"at":{"format":"date-time","type":"string"},"line":{"type":"string"},"seq":{"format":"int64","type":"integer"}},"required":["seq","line","at"],"type":"object"},"LogLines":{"properties":{"lines":{"items":{"type":"string"},"type":"array"}},"required":["lines"],"type":"object"},"Me":{"description":"The signed-in account.","properties":{"created_at":{"format":"date-time","type":"string"},"email":{"description":"The primary email address. Absent for a personal access token (see `limited`).","type":["string","null"]},"emails":{"description":"Empty for a personal access token.","items":{"$ref":"#/components/schemas/MeEmail"},"type":"array"},"has_password":{"description":"Absent for a personal access token.","type":["boolean","null"]},"id":{"type":"string"},"identities":{"description":"Connected sign-in identities, e.g. `github`.","items":{"type":"string"},"type":"array"},"limited":{"description":"True when called with a personal access token: only the public profile is shown. A\ntoken is scoped to repositories, never to the account, so it does not see email\naddresses or sign-in methods.","type":"boolean"},"name":{"example":"Halleluyah Oludele","type":"string"},"plan":{"description":"`free` or `pro`. Absent for a personal access token.","example":"free","type":["string","null"]},"second_factors":{"description":"Second factors turned on: `totp`, `passkey` (Step 1b). Empty until then.","items":{"type":"string"},"type":"array"},"username":{"example":"hallelx2","type":"string"}},"required":["id","username","name","emails","second_factors","identities","created_at","limited"],"type":"object"},"MeEmail":{"properties":{"address":{"type":"string"},"primary":{"type":"boolean"},"verified":{"type":"boolean"}},"required":["address","primary","verified"],"type":"object"},"MergeRequest":{"properties":{"commit_message":{"description":"For `merge` and `squash`: the rest of the message.","type":["string","null"]},"commit_title":{"description":"For `merge` and `squash`: the commit's title (a default names the request).","type":["string","null"]},"delete_branch":{"description":"Delete the head branch after merging.","type":"boolean"},"head_sha":{"description":"The head the caller saw: refused if it has moved since.","type":["string","null"]},"method":{"description":"`merge`, `squash` or `rebase`","type":"string"}},"required":["method"],"type":"object"},"MergeableOut":{"properties":{"checked_at":{"format":"date-time","type":["string","null"]},"conflicts":{"description":"The files that conflict; `GET …/conflicts` has their texts.","items":{"type":"string"},"type":"array"},"state":{"description":"`unknown` (being worked out), `clean`, `conflicts` or `unrelated`.","type":"string"}},"required":["state","conflicts"],"type":"object"},"Merged":{"properties":{"branch_deleted":{"type":"boolean"},"merge_sha":{"description":"The base's new tip.","type":"string"},"method":{"type":"string"}},"required":["merge_sha","method","branch_deleted"],"type":"object"},"NewCommentRequest":{"properties":{"anchor":{"oneOf":[{"$ref":"#/components/schemas/AnchorIn","description":"Lines of a file to anchor to; absent for a general comment."},{"type":"null"}]},"body":{"type":"string"}},"required":["body"],"type":"object"},"NewCrRequest":{"properties":{"base":{"description":"The branch to merge into; the repository's default branch if absent.","type":["string","null"]},"body":{"type":"string"},"draft":{"type":"boolean"},"head":{"description":"The branch with the change.","type":"string"},"title":{"type":"string"}},"required":["head","title"],"type":"object"},"NewKeyRequest":{"properties":{"key":{"description":"The public key: one line, as in `~/.ssh/id_ed25519.pub`.","type":"string"},"name":{"description":"A name for it. Defaults to the key's own comment.","type":"string"},"usage":{"$ref":"#/components/schemas/KeyUsage"}},"required":["key","usage"],"type":"object"},"NewRepoRequest":{"properties":{"default_branch":{"description":"`main` by default.","type":["string","null"]},"description":{"type":"string"},"init_readme":{"description":"Start with a README.md commit on the default branch.","type":"boolean"},"name":{"type":"string"},"owner":{"description":"The account to create it under; you by default. Organisations arrive in Step 1c.","type":["string","null"]},"visibility":{"description":"`public` or `private`","type":"string"}},"required":["name","visibility"],"type":"object"},"NewReviewRequest":{"properties":{"body":{"type":"string"},"comments":{"description":"Inline comments that go with it, each starting a thread.","items":{"$ref":"#/components/schemas/ReviewComment"},"type":"array"},"verdict":{"description":"`approve`, `request_changes` or `comment`","type":"string"}},"required":["verdict"],"type":"object"},"NewRunRequest":{"properties":{"jobs":{"description":"Jobs to run, with what they need: `job`, or `workflow:job` (default: every job a push\nruns).","items":{"type":"string"},"type":"array"},"ref":{"description":"A branch, tag or commit (default: the default branch).","type":["string","null"]},"workflow":{"description":"Only this workflow (`.lorx/actions/<name>.yml`).","type":["string","null"]}},"type":"object"},"NewTokenRequest":{"properties":{"expires_in_days":{"description":"7, 30, 90 or 365.","format":"int64","type":"integer"},"name":{"type":"string"},"permissions":{"$ref":"#/components/schemas/TokenPermissions"},"repo_scope":{"$ref":"#/components/schemas/RepoScopeRequest"}},"required":["name","expires_in_days","repo_scope","permissions"],"type":"object"},"Patch":{"description":"A suggested change, as a unified diff. `verified` is set once CI has run it: a fix is only\noffered as one when it is `Some(true)`.","properties":{"diff":{"type":"string"},"verified":{"type":["boolean","null"]}},"required":["diff"],"type":"object"},"Position":{"properties":{"end_line":{"format":"int32","type":"integer"},"line":{"format":"int32","type":"integer"},"path":{"type":"string"}},"required":["path","line","end_line"],"type":"object"},"Providers":{"properties":{"github":{"description":"Whether \"Continue with GitHub\" should be shown.","type":"boolean"}},"required":["github"],"type":"object"},"PutFileRequest":{"properties":{"branch":{"description":"The repository's default branch if left out. It must exist, unless the repository is\nempty and this is its default branch: then this is the first commit.","type":["string","null"]},"content":{"description":"The file's new contents.","type":"string"},"encoding":{"description":"`utf-8` (the default) or `base64`.","type":["string","null"]},"message":{"description":"The commit message; `Create {path}` or `Update {path}` by default.","type":["string","null"]},"path":{"description":"From the repository's root: `README.md`, `docs/setup.md`.","type":"string"},"sha":{"description":"The blob this edit was made against, from `GET …/blob`. Leave it out to create a file;\nit is refused if the file already exists.","type":["string","null"]}},"required":["path","content"],"type":"object"},"Readme":{"properties":{"path":{"type":"string"},"text":{"description":"The README's text; absent when it can't be shown (see `unshown`).","type":["string","null"]},"unshown":{"description":"Why the text is absent: `too_large`, `binary` or `symlink`. The README is still there, and a page\nlinks to it rather than saying there is none.","type":["string","null"]}},"required":["path"],"type":"object"},"RefList":{"properties":{"items":{"items":{"$ref":"#/components/schemas/RefOut"},"type":"array"}},"required":["items"],"type":"object"},"RefOut":{"properties":{"committed_at":{"format":"date-time","type":["string","null"]},"default":{"type":"boolean"},"kind":{"description":"`branch` or `tag`","type":"string"},"name":{"description":"`main`, `feature/login`, `v1.2.0`","type":"string"},"protected":{"description":"A branch rule applies to it.","type":"boolean"},"sha":{"description":"The commit it points at (a tag is peeled to its commit).","type":"string"},"signature":{"oneOf":[{"$ref":"#/components/schemas/SignatureOut","description":"An annotated tag's own signature (`null` for branches, lightweight and unsigned tags)."},{"type":"null"}]}},"required":["name","kind","sha","default","protected"],"type":"object"},"RefUpdateList":{"properties":{"items":{"items":{"$ref":"#/components/schemas/RefUpdateOut"},"type":"array"},"next_cursor":{"type":["string","null"]}},"required":["items"],"type":"object"},"RefUpdateOut":{"properties":{"after":{"description":"All zeros when the push deleted the ref.","type":"string"},"before":{"description":"All zeros when the push created the ref.","type":"string"},"created_at":{"format":"date-time","type":"string"},"forced":{"description":"Not a fast-forward (or a moved tag).","type":"boolean"},"history_ref":{"description":"Where the old head is kept, when a force-push or deletion left it behind:\n`refs/lorx/history/<id>`.","type":["string","null"]},"id":{"type":"string"},"push_id":{"description":"Every update of one push shares this.","type":"string"},"pusher":{"description":"The pusher's username, if the account still exists.","type":["string","null"]},"ref":{"description":"The full ref name, e.g. `refs/heads/main`.","type":"string"},"status":{"description":"`pending`, `applied` or `failed`.","type":"string"}},"required":["id","push_id","ref","before","after","forced","status","created_at"],"type":"object"},"RegisterRequest":{"properties":{"arch":{"type":"string"},"labels":{"description":"Labels it offers, besides its os and arch (added for it).","items":{"type":"string"},"type":"array"},"name":{"description":"What to call it: the machine's name, say.","type":"string"},"os":{"type":"string"},"token":{"description":"The `lorx_rr_…` registration token.","type":"string"},"version":{"type":"string"}},"required":["token","name","os","arch","version"],"type":"object"},"Registered":{"properties":{"credential":{"description":"`lorx_rc_…`: the runner's own credential, shown once. Keep it private (0600).","type":"string"},"id":{"type":"string"},"runner":{"$ref":"#/components/schemas/RunnerOut"}},"required":["id","credential","runner"],"type":"object"},"RegistrationToken":{"properties":{"command":{"description":"The command that registers a runner with it.","type":"string"},"expires_at":{"format":"date-time","type":"string"},"token":{"description":"`lorx_rr_…`: shown once. Give it to `bit runner register` within the hour.","type":"string"}},"required":["token","expires_at","command"],"type":"object"},"ReplyRequest":{"properties":{"body":{"type":"string"}},"required":["body"],"type":"object"},"RepoList":{"properties":{"items":{"items":{"$ref":"#/components/schemas/RepoOut"},"type":"array"},"next_cursor":{"type":["string","null"]}},"required":["items"],"type":"object"},"RepoOut":{"properties":{"clone_urls":{"$ref":"#/components/schemas/CloneUrls"},"created_at":{"format":"date-time","type":"string"},"default_branch":{"type":"string"},"deleted_at":{"description":"Set when deleted; restorable until `restorable_until`.","format":"date-time","type":["string","null"]},"description":{"type":"string"},"empty":{"description":"True until something is pushed.","type":"boolean"},"full_name":{"description":"`owner/name`","type":"string"},"id":{"type":"string"},"name":{"type":"string"},"owner":{"$ref":"#/components/schemas/RepoOwner"},"restorable_until":{"format":"date-time","type":["string","null"]},"updated_at":{"format":"date-time","type":"string"},"viewer":{"$ref":"#/components/schemas/RepoViewer"},"visibility":{"description":"`public` or `private`","type":"string"}},"required":["id","owner","name","full_name","description","visibility","default_branch","empty","clone_urls","created_at","updated_at","viewer"],"type":"object"},"RepoOwner":{"properties":{"id":{"type":"string"},"username":{"type":"string"}},"required":["id","username"],"type":"object"},"RepoScopeRequest":{"description":"Which repositories the token reaches: `\"all_mine\"`, `{ \"repo\": \"owner/name\" }` or\n`{ \"org\": \"handle\" }` (organisations arrive in Step 1c).","oneOf":[{"$ref":"#/components/schemas/ScopeWord"},{"properties":{"repo":{"type":"string"}},"required":["repo"],"type":"object"},{"properties":{"org":{"type":"string"}},"required":["org"],"type":"object"}]},"RepoStats":{"properties":{"branches":{"format":"int64","minimum":0,"type":"integer"},"commit":{"description":"The commit these describe: the tip of `ref` (the default branch by default).","type":"string"},"commits":{"format":"int64","minimum":0,"type":"integer"},"languages":{"description":"By bytes, largest first; vendored, generated and lock files left out.","items":{"$ref":"#/components/schemas/LanguageShare"},"type":"array"},"tags":{"format":"int64","minimum":0,"type":"integer"}},"required":["commit","commits","branches","tags","languages"],"type":"object"},"RepoViewer":{"properties":{"can":{"description":"What you may do: `read`, `push`, `admin`.","items":{"type":"string"},"type":"array"}},"required":["can"],"type":"object"},"Report":{"allOf":[{"$ref":"#/components/schemas/Review"},{"properties":{"base":{"description":"The commit compared against; `None` when there was nothing before (a root commit).","type":["string","null"]},"files":{"description":"Files a language pack reads that differ between the two.","minimum":0,"type":"integer"},"from_cache":{"description":"Of those, how many came from the fact cache.","minimum":0,"type":"integer"},"head":{"description":"What was reviewed: a commit, or `working tree` / `staged changes` from `bit review`.","type":"string"},"ms":{"format":"int64","minimum":0,"type":"integer"},"versions":{"description":"File versions read (a modified file has two: before and after).","minimum":0,"type":"integer"}},"required":["head","files","versions","from_cache","ms"],"type":"object"}],"description":"One review of a change: what was compared, what it cost, and the review itself."},"RerunRequest":{"properties":{"failed_only":{"description":"Only the jobs that did not pass, and those that depend on them.","type":"boolean"}},"type":"object"},"ResetRequest":{"properties":{"password":{"type":"string"},"token":{"type":"string"}},"required":["token","password"],"type":"object"},"ResolveRequest":{"properties":{"base_sha":{"type":"string"},"files":{"description":"Every conflicting file, resolved.","items":{"$ref":"#/components/schemas/ResolvedFile"},"type":"array"},"head_sha":{"description":"The head and base the resolution was made against (from `GET …/conflicts`).","type":"string"},"message":{"description":"The merge commit's message; one naming the resolved files by default.","type":["string","null"]}},"required":["head_sha","base_sha","files"],"type":"object"},"Resolved":{"properties":{"commit":{"description":"The merge commit, now the head.","type":"string"}},"required":["commit"],"type":"object"},"ResolvedFile":{"properties":{"content":{"description":"The resolved text.","type":["string","null"]},"delete":{"description":"Or resolve by removing the file.","type":"boolean"},"path":{"type":"string"},"take":{"description":"Or keep one side as it is: `ours` (the head's), `theirs` (the base branch's) or\n`base` (the merge base's). For binary, large and submodule files.","type":["string","null"]}},"required":["path"],"type":"object"},"RevertRequest":{"properties":{"body":{"description":"Said after \"Reverts #n.\".","type":["string","null"]},"draft":{"description":"Open it as a draft.","type":"boolean"},"title":{"description":"The new request's title: `Revert \"<title>\"` by default.","type":["string","null"]}},"type":"object"},"Review":{"properties":{"detectors":{"description":"Detectors that ran.","items":{"type":"string"},"type":"array"},"diff":{"$ref":"#/components/schemas/FactDiff"},"facts_version":{"format":"int32","minimum":0,"type":"integer"},"findings":{"description":"Most severe first, then by file and line. One per id.","items":{"$ref":"#/components/schemas/Finding"},"type":"array"}},"required":["facts_version","diff","findings","detectors"],"type":"object"},"ReviewComment":{"properties":{"anchor":{"$ref":"#/components/schemas/AnchorIn"},"body":{"type":"string"}},"required":["body","anchor"],"type":"object"},"ReviewList":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ReviewOut"},"type":"array"}},"required":["items"],"type":"object"},"ReviewOut":{"properties":{"author":{"type":["string","null"]},"body":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"id":{"type":"string"},"imported":{"oneOf":[{"$ref":"#/components/schemas/ImportedOut","description":"Imported from another forge: who gave it there (`author` is then null)."},{"type":"null"}]},"revision":{"format":"int32","type":"integer"},"stale":{"description":"Given on an earlier revision than the latest.","type":"boolean"},"threads":{"description":"The threads it opened.","items":{"type":"string"},"type":"array"},"verdict":{"description":"`approve`, `request_changes` or `comment`","type":"string"}},"required":["id","verdict","body","revision","stale","created_at","threads"],"type":"object"},"RevisionOut":{"properties":{"base_sha":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"forced":{"description":"The push rewrote the head's history.","type":"boolean"},"head_sha":{"type":"string"},"merge_base":{"type":["string","null"]},"number":{"description":"1 for the state it was opened with, then one per push to the head.","format":"int32","type":"integer"},"pushed_by":{"type":["string","null"]}},"required":["number","head_sha","base_sha","forced","created_at"],"type":"object"},"RevokeRequest":{"properties":{"token":{"description":"An access or refresh token of this device.","type":"string"}},"required":["token"],"type":"object"},"RuleInfo":{"description":"One rule a detector reports: what the catalog shows.","properties":{"category":{"$ref":"#/components/schemas/Category"},"id":{"description":"The rule findings carry: `builtin:data-leak/no-secrets-in-logs`.","type":"string"},"severity":{"$ref":"#/components/schemas/Severity","description":"The most severe it reports. Findings can be milder (less certain, internal code, tests)."},"summary":{"description":"What it looks for, in one sentence.","type":"string"}},"required":["id","category","severity","summary"],"type":"object"},"RunDetail":{"allOf":[{"$ref":"#/components/schemas/RunOut"},{"properties":{"jobs":{"items":{"$ref":"#/components/schemas/JobOut"},"type":"array"}},"required":["jobs"],"type":"object"}]},"RunList":{"properties":{"items":{"items":{"$ref":"#/components/schemas/RunOut"},"type":"array"},"next_before":{"description":"Pass as `before` for the next page.","format":"int64","type":["integer","null"]}},"required":["items"],"type":"object"},"RunOut":{"properties":{"actor":{"description":"Who set it off, when anyone did.","type":["string","null"]},"attempt":{"description":"1, then 2 after a re-run...","format":"int32","type":"integer"},"base":{"description":"What a review of this run compares against (the push's previous head, or where a new\nbranch left the default branch), as its runner's `LORX_BASE`. None for runs with nothing\nto compare against.","type":["string","null"]},"branch":{"type":["string","null"]},"commit":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"finished_at":{"format":"date-time","type":["string","null"]},"number":{"format":"int64","type":"integer"},"problems":{"description":"For `error`: what is wrong with the workflow, with lines.","items":{},"type":"array"},"started_at":{"format":"date-time","type":["string","null"]},"status":{"description":"`queued`, `running`, `passed`, `failed`, `cancelled` or `error` (the workflow could not\nbe planned: see `problems`).","type":"string"},"trigger":{"description":"`push`, `manual`, `schedule` or `change_request`","type":"string"},"workflow":{"type":"string"}},"required":["number","workflow","trigger","commit","status","attempt","problems","created_at"],"type":"object"},"RunnerList":{"properties":{"items":{"items":{"$ref":"#/components/schemas/RunnerOut"},"type":"array"}},"required":["items"],"type":"object"},"RunnerOut":{"properties":{"arch":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"draining":{"description":"Finishing what it holds and taking nothing new, whether online or not.","type":"boolean"},"id":{"type":"string"},"job_id":{"description":"The job it is running.","type":["string","null"]},"labels":{"items":{"type":"string"},"type":"array"},"last_seen_at":{"format":"date-time","type":["string","null"]},"name":{"type":"string"},"os":{"type":"string"},"repo_id":{"description":"The repository a repo runner serves.","type":["string","null"]},"scope":{"description":"`account`, or `repo` for one repository's runner.","type":"string"},"state":{"description":"`busy`, `idle`, `draining` or `offline`.","type":"string"},"version":{"type":"string"}},"required":["id","name","labels","scope","os","arch","version","state","draining","created_at"],"type":"object"},"ScopeWord":{"enum":["all_mine"],"type":"string"},"SecurityEvent":{"properties":{"action":{"description":"`auth.signin`, `auth.password_reset`, …","type":"string"},"actor":{"description":"`user` (you), `anonymous` (e.g. a failed sign-in) or `system`.","type":"string"},"details":{},"id":{"type":"string"},"ip":{"type":["string","null"]},"occurred_at":{"format":"date-time","type":"string"},"request_id":{"type":"string"},"user_agent":{"type":["string","null"]}},"required":["id","occurred_at","action","actor","request_id","details"],"type":"object"},"SecurityEvents":{"properties":{"items":{"items":{"$ref":"#/components/schemas/SecurityEvent"},"type":"array"},"next_cursor":{"type":["string","null"]}},"required":["items"],"type":"object"},"Severity":{"enum":["info","low","medium","high","critical"],"type":"string"},"Signature":{"properties":{"at":{"description":"RFC 3339, in UTC.","format":"date-time","type":"string"},"email":{"type":"string"},"name":{"type":"string"}},"required":["name","email","at"],"type":"object"},"SignatureOut":{"properties":{"format":{"description":"`ssh`, `openpgp` or `x509`","type":"string"},"key_fingerprint":{"description":"`SHA256:…`, for SSH signatures.","type":["string","null"]},"reason":{"description":"Why, in one word:\n- `valid`: verified;\n- `unknown_key`: a valid signature by a key no account here has;\n- `not_signing_key`: the key is registered for git over SSH only;\n- `email_mismatch`: the key's account does not have the committer's email address;\n- `bad_signature`: the signature does not match the commit (it was changed after\n  signing, or the signature was made for something else);\n- `unsupported_format`: OpenPGP or X.509, which Lorx does not verify yet;\n- `malformed`: the signature could not be read.","type":"string"},"signer":{"description":"The account that signed: set only when `verified`. A registered key alone does not\nname a signer, since nothing stops an account from registering someone else's public\nkey; the committer's email address on that account does.","type":["string","null"]},"verified":{"description":"The signature is valid, the key is registered for signing, and its account has the\nsigner's email address.","type":"boolean"}},"required":["format","verified","reason"],"type":"object"},"SigninRequest":{"properties":{"password":{"type":"string"},"remember":{"description":"\"Keep me signed in\": a 30-day session instead of one that ends with the browser.","type":"boolean"},"username_or_email":{"type":"string"}},"required":["username_or_email","password"],"type":"object"},"SignupAccepted":{"properties":{"email":{"type":"string"},"pending_verification":{"description":"Always true: a 6-digit code is on its way, and it works in this browser only.","type":"boolean"}},"required":["pending_verification","email"],"type":"object"},"SignupRequest":{"properties":{"accept_terms":{"type":"boolean"},"email":{"type":"string"},"kind":{"description":"`personal` or `team`.","type":"string"},"name":{"type":"string"},"password":{"type":"string"},"plan":{"description":"`free`, or `pro`: Pro hasn't opened, so a `pro` sign-up gets a Free account and joins the\nPro waitlist once verified. (`self` and `cloud`, from before, mean `free` and `pro`.)","type":"string"},"team_name":{"description":"Required for a team account.","type":["string","null"]},"username":{"type":"string"}},"required":["kind","name","username","email","password","plan","accept_terms"],"type":"object"},"StartedRuns":{"properties":{"items":{"description":"One run per workflow started.","items":{"$ref":"#/components/schemas/RunDetail"},"type":"array"}},"required":["items"],"type":"object"},"StepOut":{"properties":{"name":{"type":"string"},"outcome":{"description":"The step's outcome once the job has run: `passed`, `cached`, `failed`, `timed_out` or\n`not_run`.","type":["string","null"]},"run":{"type":"string"},"seconds":{"format":"double","type":["number","null"]}},"required":["name","run"],"type":"object"},"StepUp":{"properties":{"expires_at":{"format":"date-time","type":"string"},"step_up_id":{"description":"Send this in the `x-lorx-step-up` header when retrying the risky action.","type":"string"}},"required":["step_up_id","expires_at"],"type":"object"},"StepUpRequest":{"properties":{"password":{"type":"string"}},"required":["password"],"type":"object"},"ThreadList":{"properties":{"positions_computed":{"description":"Whether `position` and `outdated` were worked out: not for callers without read access\nto the code, nor when that takes too long on a vast change.","type":"boolean"},"revision":{"description":"The revision positions are given in.","format":"int32","type":"integer"},"threads":{"items":{"$ref":"#/components/schemas/ThreadOut"},"type":"array"}},"required":["threads","revision","positions_computed"],"type":"object"},"ThreadOut":{"properties":{"anchor":{"oneOf":[{"$ref":"#/components/schemas/AnchorOut","description":"Where it was written; `null` for a general thread."},{"type":"null"}]},"comments":{"items":{"$ref":"#/components/schemas/CommentOut"},"type":"array"},"id":{"description":"The thread's first comment.","type":"string"},"outdated":{"description":"Its lines were changed or removed since it was written.","type":"boolean"},"position":{"oneOf":[{"$ref":"#/components/schemas/Position","description":"Where those lines are in the latest revision; `null` when outdated or general."},{"type":"null"}]},"resolved":{"type":"boolean"},"resolved_by":{"type":["string","null"]}},"required":["id","outdated","resolved","comments"],"type":"object"},"TimelineEntry":{"properties":{"actor":{"type":["string","null"]},"at":{"format":"date-time","type":"string"},"data":{"description":"What changed: `{ revision, head, before, forced }` for a revision, `{ from, to }` for a\nnew title or base, `{ sha }` for a merge, `{ reason }` for a close, `{ number, branch }` for a revert opened,\n`{ method, delete_branch }` for auto-merge enabled, `{ reason }` for it disabled.","type":"object"},"imported":{"oneOf":[{"$ref":"#/components/schemas/ImportedOut","description":"For imported history: who did it on the forge it came from (`actor` is then null)."},{"type":"null"}]},"kind":{"description":"`opened`, `revision`, `retitled`, `edited`, `ready`, `draft`, `base_changed`, `closed`,\n`reopened`, `merged`, `head_deleted`, `head_restored`, `revert_opened`,\n`auto_merge_enabled`, `auto_merge_disabled`","type":"string"}},"required":["kind","data","at"],"type":"object"},"TokenList":{"properties":{"items":{"items":{"$ref":"#/components/schemas/TokenOut"},"type":"array"}},"required":["items"],"type":"object"},"TokenOut":{"properties":{"created_at":{"format":"date-time","type":"string"},"display":{"description":"`lorx_pat_…abcd`: enough to tell tokens apart, useless to anyone else.","type":"string"},"expires_at":{"format":"date-time","type":"string"},"id":{"type":"string"},"kind":{"description":"`pat`","type":"string"},"last_used_at":{"format":"date-time","type":["string","null"]},"last_used_ip":{"type":["string","null"]},"max_expires_at":{"description":"Renewals stop here, a year after creation.","format":"date-time","type":"string"},"name":{"type":"string"},"permissions":{"$ref":"#/components/schemas/TokenPermissions"},"repo_scope":{"$ref":"#/components/schemas/TokenScope"},"revoked_at":{"format":"date-time","type":["string","null"]},"status":{"description":"`active`, `expired` or `revoked`","type":"string"}},"required":["id","kind","name","display","repo_scope","permissions","status","created_at","expires_at","max_expires_at"],"type":"object"},"TokenPermissions":{"description":"Permission per repository area. Missing areas are `none`.","properties":{"change_requests":{"$ref":"#/components/schemas/AccessLevel","default":"none"},"code":{"$ref":"#/components/schemas/AccessLevel","default":"none","description":"Clone, fetch (read); push (write)."},"create_repos":{"default":false,"description":"Create repositories under your own account (`POST /repos`).","type":"boolean"},"issues":{"$ref":"#/components/schemas/AccessLevel","default":"none"},"releases":{"$ref":"#/components/schemas/AccessLevel","default":"none"},"runs":{"$ref":"#/components/schemas/AccessLevel","default":"none","description":"Runs and their artifacts."}},"type":"object"},"TokenRequest":{"properties":{"client_id":{"type":["string","null"]},"device_code":{"type":["string","null"]},"grant_type":{"description":"`urn:ietf:params:oauth:grant-type:device_code` or `refresh_token`.","type":"string"},"refresh_token":{"type":["string","null"]}},"required":["grant_type"],"type":"object"},"TokenResponse":{"properties":{"access_token":{"description":"`lorx_at_…`, for `Authorization: Bearer` and as the git password.","type":"string"},"expires_in":{"format":"int64","type":"integer"},"refresh_token":{"description":"`lorx_rt_…`: exchange it for a new pair before or after the access token expires.\nSingle use.","type":"string"},"scope":{"type":"string"},"ssh_key_added":{"description":"Whether approving added the device's SSH key for signing.","type":"boolean"},"token_type":{"description":"`Bearer`","type":"string"}},"required":["access_token","token_type","expires_in","refresh_token","scope","ssh_key_added"],"type":"object"},"TokenScope":{"properties":{"kind":{"description":"`all_mine`, `repo` or `org`","type":"string"},"repo":{"description":"`owner/name` for a repository scope (absent if that repository has since gone).","type":["string","null"]}},"required":["kind"],"type":"object"},"TreeEntry":{"properties":{"executable":{"type":"boolean"},"kind":{"description":"`dir`, `file`, `symlink` or `submodule`","type":"string"},"last_commit":{"oneOf":[{"$ref":"#/components/schemas/LastCommit","description":"The last commit that changed this entry (first-parent history)."},{"type":"null"}]},"name":{"type":"string"},"path":{"type":"string"},"sha":{"type":"string"},"size":{"description":"Bytes, for files and symlinks.","format":"int64","minimum":0,"type":["integer","null"]}},"required":["name","path","kind","executable","sha"],"type":"object"},"TreeOut":{"properties":{"commit":{"$ref":"#/components/schemas/CommitOut","description":"The commit `ref` resolved to."},"entries":{"items":{"$ref":"#/components/schemas/TreeEntry"},"type":"array"},"path":{"type":"string"},"readme":{"oneOf":[{"$ref":"#/components/schemas/Readme","description":"The directory's README, when it has one of at most 256 KB."},{"type":"null"}]}},"required":["commit","path","entries"],"type":"object"},"UpdateKeyRequest":{"properties":{"name":{"type":["string","null"]},"usage":{"oneOf":[{"$ref":"#/components/schemas/KeyUsage"},{"type":"null"}]}},"type":"object"},"VerifyEmailRequest":{"properties":{"code":{"example":"482913","type":"string"},"email":{"type":"string"}},"required":["email","code"],"type":"object"}}},"info":{"contact":{"email":"hello@lorx.space","name":"Lorx","url":"https://lorx.space"},"description":"The API behind the Lorx web app, mobile app and the bit CLI.","title":"Lorx API","version":"0.0.1"},"openapi":"3.1.0","paths":{"/api/v1/auth/csrf":{"get":{"operationId":"csrf_token","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CsrfToken"}}}}},"summary":"A CSRF token for this browser. Also sets it as a cookie; call once before the first\nunsafe request.","tags":["auth"]}},"/api/v1/auth/github/callback":{"get":{"operationId":"callback","parameters":[{"in":"query","name":"code","required":false,"schema":{"type":["string","null"]}},{"in":"query","name":"state","required":false,"schema":{"type":["string","null"]}},{"description":"Set by GitHub when the person declined.","in":"query","name":"error","required":false,"schema":{"type":["string","null"]}}],"responses":{"303":{"description":"Into the web app, with `?error=` on failure"}},"summary":"Where GitHub sends the browser back.","tags":["auth"]}},"/api/v1/auth/github/complete":{"post":{"operationId":"complete","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompleteRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Me"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"`invalid_token`: expired, used, or another browser"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"`email_taken` or `github_linked_elsewhere`: something changed meanwhile"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"summary":"Finishes signing up with GitHub: creates the account with the chosen username and signs\nin. Works once, from the browser that started it, within 30 minutes.","tags":["auth"]}},"/api/v1/auth/github/start":{"get":{"operationId":"start","parameters":[{"description":"`signin` (default), `link` (add GitHub to your account) or `step_up`.","in":"query","name":"intent","required":false,"schema":{"type":["string","null"]}},{"description":"A path in the web app to come back to.","in":"query","name":"return_to","required":false,"schema":{"type":["string","null"]}},{"description":"For `intent=link`: a step-up id from `POST /auth/step-up` (not needed right after\nsigning in).","in":"query","name":"step_up","required":false,"schema":{"type":["string","null"]}}],"responses":{"302":{"description":"To GitHub"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Not set up"}},"summary":"Starts signing in (or linking, or stepping up) with GitHub: redirects to GitHub.","tags":["auth"]}},"/api/v1/auth/password/forgot":{"post":{"operationId":"password_forgot","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailRequest"}}},"required":true},"responses":{"202":{},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"summary":"Emails a single-use reset link if the address has an account. Always answers 202, in the same\ntime either way (the email is sent in the background). At most one email per account per\nminute; asking again sooner quietly sends nothing, so nobody can block a reset.","tags":["auth"]}},"/api/v1/auth/password/reset":{"post":{"operationId":"password_reset","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResetRequest"}}},"required":true},"responses":{"204":{},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"`invalid_token`: expired or already used"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"summary":"Sets a new password with a reset link's token. The link works once; every other reset link,\nevery session and every known-device cookie of the account stops working, and this browser\nbecomes the account's one known device (so the owner cannot be locked out of it).","tags":["auth"]}},"/api/v1/auth/providers":{"get":{"operationId":"providers","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Providers"}}}}},"summary":"Which sign-in providers this server offers.","tags":["auth"]}},"/api/v1/auth/resend-code":{"post":{"operationId":"resend_code","responses":{"202":{},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"summary":"Emails a new code for this browser's pending sign-up (at most one every 30 seconds, and a\nfew in total). Always answers 202; the code already in the inbox keeps working until the new\none is sent.","tags":["auth"]}},"/api/v1/auth/signin":{"post":{"operationId":"signin","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SigninRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Me"}}},"description":"Signed in; the session cookie is set"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"`invalid_credentials`: the same answer for an unknown account and a wrong password"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many attempts from this address, or on this account from browsers it has not signed in on"}},"summary":"Signs in with a password.","tags":["auth"]}},"/api/v1/auth/signout":{"post":{"operationId":"signout","responses":{"204":{}},"summary":"Ends the current session.","tags":["auth"]}},"/api/v1/auth/signup":{"post":{"operationId":"signup","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignupRequest"}}},"required":true},"responses":{"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignupAccepted"}}}},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A field is invalid, or the username belongs to an account"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"summary":"Starts a sign-up: emails a 6-digit code that works in this browser. The account is created\nwhen the code is confirmed. An address that already has an account gets the same answer (its\nowner is emailed instead), so sign-up does not reveal which addresses are registered.","tags":["auth"]}},"/api/v1/auth/step-up":{"post":{"operationId":"step_up","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StepUpRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StepUp"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Not signed in, or `invalid_credentials`"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"`no_password`: the account has no password to confirm with"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"summary":"Confirms it's you before a risky action (deleting a repository, creating a token, …).\nValid for 5 minutes, for this session only.","tags":["auth"]}},"/api/v1/auth/verify-email":{"post":{"operationId":"verify_email","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyEmailRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Me"}}},"description":"The account is created and signed in; the session cookie is set"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"`invalid_code`, or `code_expired` after too many wrong tries (ask for a new one)"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"`username_taken` or `email_taken`: someone else verified first"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"`account_created`: the account exists but the session could not start; sign in"}},"summary":"Confirms the emailed code, creates the account and signs it in. Works only in the browser\nthat started the sign-up.","tags":["auth"]}},"/api/v1/device/{user_code}":{"get":{"operationId":"show","parameters":[{"in":"path","name":"user_code","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeviceRequestOut"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"410":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"`code_expired`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"summary":"A device waiting for approval, by the code shown on it.","tags":["oauth"]}},"/api/v1/device/{user_code}/approve":{"post":{"operationId":"approve","parameters":[{"in":"path","name":"user_code","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApproveRequest"}}},"required":true},"responses":{"204":{},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"`step_up_required`"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"410":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"summary":"Approves a waiting device (needs step-up), adding the SSH key it offered unless told not to.","tags":["oauth"]}},"/api/v1/device/{user_code}/deny":{"post":{"operationId":"deny","parameters":[{"in":"path","name":"user_code","required":true,"schema":{"type":"string"}}],"responses":{"204":{},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"410":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"summary":"Denies a waiting device: its code stops working at once.","tags":["oauth"]}},"/api/v1/events":{"get":{"operationId":"stream","parameters":[{"description":"Comma-separated: `repo:<owner>/<name>`, `cr:<owner>/<name>#<n>`, `run:<owner>/<name>#<n>`.\nUp to 50.","in":"query","name":"topics","required":true,"schema":{"type":"string"}},{"description":"Resume after this event (EventSource sends it on reconnecting).","in":"header","name":"Last-Event-ID","required":false,"schema":{"type":["string","null"]}}],"responses":{"200":{"content":{"text/event-stream":{"schema":{"$ref":"#/components/schemas/LiveOut"}}},"description":"`text/event-stream`. Each event's id is its `seq`, its name its `kind`, its data a `LiveOut`."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A topic names something that does not exist, or that you cannot see"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Too many streams open at once"}},"summary":"Streams events for the topics asked for: first everything after `Last-Event-ID` (when\nreconnecting), then each new one as it happens. The first event is `ready`; `revoked`\nends a stream whose access has gone.","tags":["events"]}},"/api/v1/health":{"get":{"operationId":"health","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Health"}}},"description":"Every check passed"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Health"}}},"description":"At least one check failed"}},"summary":"Liveness and readiness: the database answers and the schema is present, and the data\ndirectory is writable.","tags":["meta"]}},"/api/v1/me":{"get":{"operationId":"me","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Me"}}},"description":"The signed-in account"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Not signed in"}},"summary":"Who the caller is.","tags":["account"]}},"/api/v1/oauth/device/code":{"post":{"operationId":"device_code","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeviceCodeRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeviceCodeResponse"}}}},"400":{"description":"RFC 6749 error: `invalid_client`, `invalid_request`"}},"summary":"Starts a device sign-in (RFC 8628 §3.1).","tags":["oauth"]}},"/api/v1/oauth/revoke":{"post":{"operationId":"revoke","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RevokeRequest"}}},"required":true},"responses":{"200":{}},"summary":"Signs a device out (RFC 7009): revokes the session the token belongs to, with all its\ntokens. Always answers 200, as the RFC asks, so it reveals nothing about the token.","tags":["oauth"]}},"/api/v1/oauth/token":{"post":{"operationId":"token","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenResponse"}}}},"400":{"description":"RFC 6749/8628 error: `authorization_pending`, `slow_down`, `access_denied`, `expired_token`, `invalid_grant`, `unsupported_grant_type`"}},"summary":"Exchanges a device code (RFC 8628 §3.4) or a refresh token (RFC 6749 §6) for tokens.","tags":["oauth"]}},"/api/v1/repos":{"post":{"operationId":"repos_create","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewRepoRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RepoOut"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"You cannot create repositories under that owner"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"`conflict`: the owner already has a repository with that name"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"summary":"Creates a repository. It can be pushed to at once.","tags":["repos"]}},"/api/v1/repos/{owner}/{repo}":{"delete":{"operationId":"repos_delete","parameters":[{"in":"path","name":"owner","required":true,"schema":{"type":"string"}},{"in":"path","name":"repo","required":true,"schema":{"type":"string"}}],"responses":{"204":{},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"`step_up_required`, or not yours"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Already deleted"}},"summary":"Deletes a repository. It can be restored for 30 days, then it and its git data are removed.\nNeeds step-up.","tags":["repos"]},"get":{"operationId":"repos_get","parameters":[{"in":"path","name":"owner","required":true,"schema":{"type":"string"}},{"in":"path","name":"repo","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RepoOut"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"summary":"A repository. Private ones are 404 unless you can see them; deleted ones only to their\nowner, with `deleted_at` set.","tags":["repos"]}},"/api/v1/repos/{owner}/{repo}/blame":{"get":{"operationId":"blame","parameters":[{"in":"path","name":"owner","required":true,"schema":{"type":"string"}},{"in":"path","name":"repo","required":true,"schema":{"type":"string"}},{"description":"A branch, tag or commit sha. The default branch when left out.","in":"query","name":"ref","required":false,"schema":{"type":["string","null"]}},{"description":"A path in the tree, `/`-separated. The root when left out.","in":"query","name":"path","required":false,"schema":{"type":["string","null"]}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlameOut"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"summary":"Which commit last changed each line of a file.","tags":["code"]}},"/api/v1/repos/{owner}/{repo}/blob":{"get":{"operationId":"blob","parameters":[{"in":"path","name":"owner","required":true,"schema":{"type":"string"}},{"in":"path","name":"repo","required":true,"schema":{"type":"string"}},{"description":"A branch, tag or commit sha. The default branch when left out.","in":"query","name":"ref","required":false,"schema":{"type":["string","null"]}},{"description":"A path in the tree, `/`-separated. The root when left out.","in":"query","name":"path","required":false,"schema":{"type":["string","null"]}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlobResponse"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"`ref_not_found`, `path_not_found`, or no such repository"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"`empty_repository`"}},"summary":"A file: size, language, line count, and its text when it is text and at most 1 MB.","tags":["code"]}},"/api/v1/repos/{owner}/{repo}/commits":{"get":{"operationId":"code_commits","parameters":[{"in":"path","name":"owner","required":true,"schema":{"type":"string"}},{"in":"path","name":"repo","required":true,"schema":{"type":"string"}},{"in":"query","name":"ref","required":false,"schema":{"type":["string","null"]}},{"description":"Only commits that changed this path.","in":"query","name":"path","required":false,"schema":{"type":["string","null"]}},{"description":"The `next_cursor` of the previous page.","in":"query","name":"cursor","required":false,"schema":{"type":["string","null"]}},{"description":"Up to 100; 30 by default.","in":"query","name":"limit","required":false,"schema":{"minimum":0,"type":["integer","null"]}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommitList"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"summary":"History, newest first, like `git log`; only commits that changed `path` when it is given.","tags":["code"]}},"/api/v1/repos/{owner}/{repo}/commits/{sha}":{"get":{"operationId":"commit","parameters":[{"in":"path","name":"owner","required":true,"schema":{"type":"string"}},{"in":"path","name":"repo","required":true,"schema":{"type":"string"}},{"in":"path","name":"sha","required":true,"schema":{"type":"string"}},{"description":"Only this file's diff, with all its hunks.","in":"query","name":"file","required":false,"schema":{"type":["string","null"]}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommitDetail"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"summary":"One commit and its diff against its first parent.","tags":["code"]}},"/api/v1/repos/{owner}/{repo}/community":{"get":{"operationId":"community","parameters":[{"in":"path","name":"owner","required":true,"schema":{"type":"string"}},{"in":"path","name":"repo","required":true,"schema":{"type":"string"}},{"description":"A branch, tag or commit sha. The default branch when left out.","in":"query","name":"ref","required":false,"schema":{"type":["string","null"]}},{"description":"A path in the tree, `/`-separated. The root when left out.","in":"query","name":"path","required":false,"schema":{"type":["string","null"]}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Community"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"summary":"The repository's README, licence (named when it is one we know), contributing guide, code\nof conduct and security policy, for its About panel. Each is looked for at the root, then in\n`.github/`, then in `docs/`.","tags":["code"]}},"/api/v1/repos/{owner}/{repo}/compare":{"get":{"operationId":"compare","parameters":[{"in":"path","name":"owner","required":true,"schema":{"type":"string"}},{"in":"path","name":"repo","required":true,"schema":{"type":"string"}},{"description":"What the changes would land on: a branch, tag or sha.","in":"query","name":"base","required":true,"schema":{"type":"string"}},{"description":"Where the changes are.","in":"query","name":"head","required":true,"schema":{"type":"string"}},{"description":"Only this file's diff, with all its hunks.","in":"query","name":"file","required":false,"schema":{"type":["string","null"]}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Comparison"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"summary":"`base...head`: the commits `head` has that `base` does not, and the diff from their merge\nbase, as a change request would show it.","tags":["code"]}},"/api/v1/repos/{owner}/{repo}/contents":{"delete":{"operationId":"contents_delete","parameters":[{"in":"path","name":"owner","required":true,"schema":{"type":"string"}},{"in":"path","name":"repo","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteFileRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileWritten"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such repository, `branch_missing`, or `not_found` (no such file)"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"`stale` (it changed since `sha`), `moved`, `refused` (a branch rule)"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"summary":"Removes one file as a commit on a branch. Branch rules apply.","tags":["code"]},"put":{"operationId":"put","parameters":[{"in":"path","name":"owner","required":true,"schema":{"type":"string"}},{"in":"path","name":"repo","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PutFileRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileWritten"}}},"description":"Updated"},"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileWritten"}}},"description":"Created"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"No such repository, or `branch_missing`"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"`exists` (creating a file that is there), `stale` (it changed since `sha`), `gone` (it was removed since), `unchanged`, `moved` (the branch moved: try again), `refused` (a branch rule)"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Larger than 1 MiB: push it with git"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A bad path, branch, encoding or content"}},"summary":"Creates or updates one file as a commit on a branch. Branch rules apply; a branch that\nrequires change requests refuses.","tags":["code"]}},"/api/v1/repos/{owner}/{repo}/crs":{"get":{"operationId":"change_requests_list","parameters":[{"in":"path","name":"owner","required":true,"schema":{"type":"string"}},{"in":"path","name":"repo","required":true,"schema":{"type":"string"}},{"description":"`open` (with drafts), `draft`, `merged`, `closed` or `all`; `open` by default.","in":"query","name":"state","required":false,"schema":{"type":["string","null"]}},{"description":"A username.","in":"query","name":"author","required":false,"schema":{"type":["string","null"]}},{"description":"Words in the title.","in":"query","name":"q","required":false,"schema":{"type":["string","null"]}},{"description":"`new` (default), `old` or `updated`.","in":"query","name":"sort","required":false,"schema":{"type":["string","null"]}},{"in":"query","name":"cursor","required":false,"schema":{"type":["string","null"]}},{"description":"Up to 100; 30 by default.","in":"query","name":"limit","required":false,"schema":{"format":"int64","minimum":0,"type":["integer","null"]}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrList"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"summary":"A repository's change requests.","tags":["change_requests"]},"post":{"operationId":"change_requests_create","parameters":[{"in":"path","name":"owner","required":true,"schema":{"type":"string"}},{"in":"path","name":"repo","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewCrRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrDetail"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"`change_request_exists`: one is already open for these branches (its number is in the message)"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A branch is missing, the branches are the same or share no history, or the head has nothing new"}},"summary":"Opens a change request from `head` to `base`.","tags":["change_requests"]}},"/api/v1/repos/{owner}/{repo}/crs/{number}":{"get":{"operationId":"change_requests_get","parameters":[{"in":"path","name":"owner","required":true,"schema":{"type":"string"}},{"in":"path","name":"repo","required":true,"schema":{"type":"string"}},{"in":"path","name":"number","required":true,"schema":{"format":"int64","type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrDetail"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"summary":"One change request: its revisions and its timeline.","tags":["change_requests"]},"patch":{"operationId":"change_requests_update","parameters":[{"in":"path","name":"owner","required":true,"schema":{"type":"string"}},{"in":"path","name":"repo","required":true,"schema":{"type":"string"}},{"in":"path","name":"number","required":true,"schema":{"format":"int64","type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EditCrRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrDetail"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"`change_request_closed` (merged or closed requests keep their base), or `change_request_exists` for the new base"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"summary":"Changes a request's title, body, draft state or base.","tags":["change_requests"]}},"/api/v1/repos/{owner}/{repo}/crs/{number}/auto-merge":{"delete":{"operationId":"disarm","parameters":[{"in":"path","name":"owner","required":true,"schema":{"type":"string"}},{"in":"path","name":"repo","required":true,"schema":{"type":"string"}},{"in":"path","name":"number","required":true,"schema":{"format":"int64","type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrDetail"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"summary":"Disarms auto-merge. Anyone who could arm it can. A merge it started already finishes.","tags":["change_requests"]},"put":{"operationId":"arm","parameters":[{"in":"path","name":"owner","required":true,"schema":{"type":"string"}},{"in":"path","name":"repo","required":true,"schema":{"type":"string"}},{"in":"path","name":"number","required":true,"schema":{"format":"int64","type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArmRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrDetail"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"`change_request_closed`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"summary":"Arms a change request to merge itself once everything required of it passes: open (not a\ndraft) and merging cleanly. It merges as the caller, with their access when it fires, even\nwith every client closed. Arming again replaces how it merges. If it can merge now, it does\nbefore this answers.","tags":["change_requests"]}},"/api/v1/repos/{owner}/{repo}/crs/{number}/close":{"post":{"operationId":"close","parameters":[{"in":"path","name":"owner","required":true,"schema":{"type":"string"}},{"in":"path","name":"repo","required":true,"schema":{"type":"string"}},{"in":"path","name":"number","required":true,"schema":{"format":"int64","type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CloseRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrDetail"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"summary":"Closes an open request without merging it.","tags":["change_requests"]}},"/api/v1/repos/{owner}/{repo}/crs/{number}/comments":{"get":{"operationId":"cr_comments_list","parameters":[{"in":"path","name":"owner","required":true,"schema":{"type":"string"}},{"in":"path","name":"repo","required":true,"schema":{"type":"string"}},{"in":"path","name":"number","required":true,"schema":{"format":"int64","type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThreadList"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"summary":"A request's threads: general and inline, with where each inline one is now.","tags":["change_requests"]},"post":{"operationId":"cr_comments_create","parameters":[{"in":"path","name":"owner","required":true,"schema":{"type":"string"}},{"in":"path","name":"repo","required":true,"schema":{"type":"string"}},{"in":"path","name":"number","required":true,"schema":{"format":"int64","type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewCommentRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThreadList"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"summary":"Starts a thread: general, or on lines of a file.","tags":["change_requests"]}},"/api/v1/repos/{owner}/{repo}/crs/{number}/comments/{id}":{"delete":{"operationId":"cr_comments_delete","parameters":[{"in":"path","name":"owner","required":true,"schema":{"type":"string"}},{"in":"path","name":"repo","required":true,"schema":{"type":"string"}},{"in":"path","name":"number","required":true,"schema":{"format":"int64","type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"204":{},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"summary":"Deletes a comment (its author, or the repository's admins). Its place in the thread stays.","tags":["change_requests"]},"patch":{"operationId":"edit","parameters":[{"in":"path","name":"owner","required":true,"schema":{"type":"string"}},{"in":"path","name":"repo","required":true,"schema":{"type":"string"}},{"in":"path","name":"number","required":true,"schema":{"format":"int64","type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EditCommentRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThreadList"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"summary":"Edits your comment.","tags":["change_requests"]}},"/api/v1/repos/{owner}/{repo}/crs/{number}/comments/{id}/replies":{"post":{"operationId":"reply","parameters":[{"in":"path","name":"owner","required":true,"schema":{"type":"string"}},{"in":"path","name":"repo","required":true,"schema":{"type":"string"}},{"in":"path","name":"number","required":true,"schema":{"format":"int64","type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReplyRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThreadList"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"summary":"Replies in a thread (to any of its comments).","tags":["change_requests"]}},"/api/v1/repos/{owner}/{repo}/crs/{number}/comments/{id}/resolve":{"post":{"operationId":"cr_comments_resolve","parameters":[{"in":"path","name":"owner","required":true,"schema":{"type":"string"}},{"in":"path","name":"repo","required":true,"schema":{"type":"string"}},{"in":"path","name":"number","required":true,"schema":{"format":"int64","type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThreadList"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"summary":"Resolves a thread.","tags":["change_requests"]}},"/api/v1/repos/{owner}/{repo}/crs/{number}/comments/{id}/unresolve":{"post":{"operationId":"unresolve","parameters":[{"in":"path","name":"owner","required":true,"schema":{"type":"string"}},{"in":"path","name":"repo","required":true,"schema":{"type":"string"}},{"in":"path","name":"number","required":true,"schema":{"format":"int64","type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThreadList"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"summary":"Reopens a resolved thread.","tags":["change_requests"]}},"/api/v1/repos/{owner}/{repo}/crs/{number}/commits":{"get":{"operationId":"change_requests_commits","parameters":[{"in":"path","name":"owner","required":true,"schema":{"type":"string"}},{"in":"path","name":"repo","required":true,"schema":{"type":"string"}},{"in":"path","name":"number","required":true,"schema":{"format":"int64","type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrCommits"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"summary":"A request's commits: what its head has that its base does not.","tags":["change_requests"]}},"/api/v1/repos/{owner}/{repo}/crs/{number}/conflicts":{"get":{"operationId":"conflicts","parameters":[{"in":"path","name":"owner","required":true,"schema":{"type":"string"}},{"in":"path","name":"repo","required":true,"schema":{"type":"string"}},{"in":"path","name":"number","required":true,"schema":{"format":"int64","type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Conflicts"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"`branch_missing`"}},"summary":"What conflicts merging the request's base into its head: each file with its three texts,\nthe merged text with markers, and its hunks.","tags":["change_requests"]}},"/api/v1/repos/{owner}/{repo}/crs/{number}/files":{"get":{"operationId":"files","parameters":[{"in":"path","name":"owner","required":true,"schema":{"type":"string"}},{"in":"path","name":"repo","required":true,"schema":{"type":"string"}},{"in":"path","name":"number","required":true,"schema":{"format":"int64","type":"integer"}},{"description":"The revision to show (the latest by default).","in":"query","name":"revision","required":false,"schema":{"format":"int32","type":["integer","null"]}},{"description":"Only what changed since this revision: the head then against the head now.","in":"query","name":"since_revision","required":false,"schema":{"format":"int32","type":["integer","null"]}},{"description":"Only this file, with all its hunks.","in":"query","name":"file","required":false,"schema":{"type":["string","null"]}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrFiles"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"summary":"The files a request changes: its head against the merge base with its base, as\n`git diff base...head` shows them, for any revision.","tags":["change_requests"]}},"/api/v1/repos/{owner}/{repo}/crs/{number}/merge":{"post":{"operationId":"merge","parameters":[{"in":"path","name":"owner","required":true,"schema":{"type":"string"}},{"in":"path","name":"repo","required":true,"schema":{"type":"string"}},{"in":"path","name":"number","required":true,"schema":{"format":"int64","type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MergeRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Merged"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"`conflicts` (with the files), `draft`, `change_request_closed`, `moved`, `nothing_to_merge`, `unrelated`, `rebase_conflicts`, `rebase_merge_commits`, `refused` (a branch rule), `branch_missing`, `checks` (the base's rules want CI to pass or the review to find nothing at a severity; the message names each reason)"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"summary":"Merges a change request into its base.","tags":["change_requests"]}},"/api/v1/repos/{owner}/{repo}/crs/{number}/reopen":{"post":{"operationId":"reopen","parameters":[{"in":"path","name":"owner","required":true,"schema":{"type":"string"}},{"in":"path","name":"repo","required":true,"schema":{"type":"string"}},{"in":"path","name":"number","required":true,"schema":{"format":"int64","type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrDetail"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"summary":"Reopens a closed request.","tags":["change_requests"]}},"/api/v1/repos/{owner}/{repo}/crs/{number}/resolve":{"post":{"operationId":"cr_conflicts_resolve","parameters":[{"in":"path","name":"owner","required":true,"schema":{"type":"string"}},{"in":"path","name":"repo","required":true,"schema":{"type":"string"}},{"in":"path","name":"number","required":true,"schema":{"format":"int64","type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResolveRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resolved"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"`moved` (a branch moved since: resolve again), `change_request_closed`, `branch_missing`, `refused` (a branch rule)"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A conflicting file is left unresolved, a file is named that does not conflict, or conflict markers remain"}},"summary":"Resolves the conflicts: a merge commit of the base into the head with the resolved files,\non the head branch.","tags":["change_requests"]}},"/api/v1/repos/{owner}/{repo}/crs/{number}/revert":{"post":{"operationId":"revert","parameters":[{"in":"path","name":"owner","required":true,"schema":{"type":"string"}},{"in":"path","name":"repo","required":true,"schema":{"type":"string"}},{"in":"path","name":"number","required":true,"schema":{"format":"int64","type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RevertRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrDetail"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"`not_merged`, `revert_unknown` (merged before Lorx recorded what merges bring in, other than by a merge commit), `branch_missing` (the base is gone), `revert_conflicts` (with the files), `nothing_to_revert` (the base no longer holds it), `refused` (a branch rule), `moved`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"summary":"Opens a change request that reverts a merged one.","tags":["change_requests"]}},"/api/v1/repos/{owner}/{repo}/crs/{number}/reviews":{"get":{"operationId":"reviews","parameters":[{"in":"path","name":"owner","required":true,"schema":{"type":"string"}},{"in":"path","name":"repo","required":true,"schema":{"type":"string"}},{"in":"path","name":"number","required":true,"schema":{"format":"int64","type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewList"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"summary":"A request's reviews, oldest first.","tags":["change_requests"]},"post":{"operationId":"review","parameters":[{"in":"path","name":"owner","required":true,"schema":{"type":"string"}},{"in":"path","name":"repo","required":true,"schema":{"type":"string"}},{"in":"path","name":"number","required":true,"schema":{"format":"int64","type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewReviewRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewList"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"`change_request_closed`: merged and closed requests take comments, not verdicts"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"summary":"Reviews the latest revision: approve, request changes or just comment, with inline\ncomments. The request's author may only comment.","tags":["change_requests"]}},"/api/v1/repos/{owner}/{repo}/import/change-requests":{"post":{"operationId":"import","parameters":[{"in":"path","name":"owner","required":true,"schema":{"type":"string"}},{"in":"path","name":"repo","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportResult"}}},"description":"What happened to each pull request"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"summary":"Imports pull requests from GitHub as change requests of the same numbers. The repository's\nowner only. Each pull request's head must be pushed to `refs/imported/pull/<n>/head` first.","tags":["change_requests"]}},"/api/v1/repos/{owner}/{repo}/raw":{"get":{"operationId":"raw","parameters":[{"in":"path","name":"owner","required":true,"schema":{"type":"string"}},{"in":"path","name":"repo","required":true,"schema":{"type":"string"}},{"description":"A branch, tag or commit sha. The default branch when left out.","in":"query","name":"ref","required":false,"schema":{"type":["string","null"]}},{"description":"A path in the tree, `/`-separated. The root when left out.","in":"query","name":"path","required":false,"schema":{"type":["string","null"]}}],"responses":{"200":{"description":"The file's bytes"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"summary":"A file's bytes. Served as plain text, as a raster image (by its own bytes, so a README's\npictures show), or as an attachment; never as HTML or SVG, and sandboxed, so a pushed web\npage can never run on the API's origin.","tags":["code"]}},"/api/v1/repos/{owner}/{repo}/refs":{"get":{"operationId":"refs","parameters":[{"in":"path","name":"owner","required":true,"schema":{"type":"string"}},{"in":"path","name":"repo","required":true,"schema":{"type":"string"}},{"description":"`branch` (default) or `tag`.","in":"query","name":"kind","required":false,"schema":{"type":["string","null"]}},{"description":"Only names containing this, ignoring case.","in":"query","name":"q","required":false,"schema":{"type":["string","null"]}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefList"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"summary":"Branches (the default first, then the most recently committed) or tags.","tags":["code"]}},"/api/v1/repos/{owner}/{repo}/refs/history":{"get":{"operationId":"ref_history","parameters":[{"in":"path","name":"owner","required":true,"schema":{"type":"string"}},{"in":"path","name":"repo","required":true,"schema":{"type":"string"}},{"description":"Only this ref: a full name (`refs/heads/main`) or a branch name (`main`).","in":"query","name":"name","required":false,"schema":{"type":["string","null"]}},{"description":"The `next_cursor` of the previous page.","in":"query","name":"cursor","required":false,"schema":{"type":["string","null"]}},{"description":"Up to 100; 30 by default.","in":"query","name":"limit","required":false,"schema":{"format":"int64","minimum":0,"type":["integer","null"]}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefUpdateList"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"summary":"What pushes did to this repository's refs, newest first: every ref, or one (`?name=`).","tags":["repos"]}},"/api/v1/repos/{owner}/{repo}/restore":{"post":{"operationId":"restore","parameters":[{"in":"path","name":"owner","required":true,"schema":{"type":"string"}},{"in":"path","name":"repo","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RepoOut"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Not deleted"}},"summary":"Restores a deleted repository within its restore window.","tags":["repos"]}},"/api/v1/repos/{owner}/{repo}/review":{"get":{"operationId":"code_review","parameters":[{"in":"path","name":"owner","required":true,"schema":{"type":"string"}},{"in":"path","name":"repo","required":true,"schema":{"type":"string"}},{"description":"What to compare against: a branch, tag or sha. By default, where `head` left the default\nbranch (their merge base); for a commit on the default branch itself, its parent.","in":"query","name":"base","required":false,"schema":{"type":["string","null"]}},{"description":"What to review: a branch, tag or sha.","in":"query","name":"head","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Report"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"summary":"Lorx Review of `head` against `base` (HAL-2269): findings ordered most severe first, and what\nchanged that other code can see. The same engine and report as `bit review --json` and the\nCI `review` job; facts are cached by blob, so files reviewed before cost nothing.","tags":["code"]}},"/api/v1/repos/{owner}/{repo}/rules":{"get":{"operationId":"list_rules","parameters":[{"in":"path","name":"owner","required":true,"schema":{"type":"string"}},{"in":"path","name":"repo","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BranchRuleList"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"summary":"A repository's branch rules.","tags":["repos"]},"post":{"operationId":"create_rule","parameters":[{"in":"path","name":"owner","required":true,"schema":{"type":"string"}},{"in":"path","name":"repo","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BranchRuleRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BranchRuleOut"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"`step_up_required`, or not an admin"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"A rule for this pattern exists"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"`validation_failed` (pattern)"}},"summary":"Adds a branch rule. Needs admin and step-up.","tags":["repos"]}},"/api/v1/repos/{owner}/{repo}/rules/{id}":{"delete":{"operationId":"delete_rule","parameters":[{"in":"path","name":"owner","required":true,"schema":{"type":"string"}},{"in":"path","name":"repo","required":true,"schema":{"type":"string"}},{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"204":{},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"`step_up_required`, or not an admin"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"summary":"Removes a branch rule. Needs admin and step-up.","tags":["repos"]},"patch":{"operationId":"update_rule","parameters":[{"in":"path","name":"owner","required":true,"schema":{"type":"string"}},{"in":"path","name":"repo","required":true,"schema":{"type":"string"}},{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BranchRuleUpdate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BranchRuleOut"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"`step_up_required`, or not an admin"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"summary":"Changes a branch rule. Needs admin and step-up.","tags":["repos"]}},"/api/v1/repos/{owner}/{repo}/runners":{"get":{"operationId":"runners_list_for_repo","parameters":[{"in":"path","name":"owner","required":true,"schema":{"type":"string"}},{"in":"path","name":"repo","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunnerList"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"summary":"The runners that can take this repository's jobs: its own and its owner's account runners.","tags":["runners"]}},"/api/v1/repos/{owner}/{repo}/runners/registration-token":{"post":{"operationId":"runners_repo_registration_token","parameters":[{"in":"path","name":"owner","required":true,"schema":{"type":"string"}},{"in":"path","name":"repo","required":true,"schema":{"type":"string"}}],"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegistrationToken"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"summary":"A one-time token that registers a runner for this repository only. Needs admin and step-up.","tags":["runners"]}},"/api/v1/repos/{owner}/{repo}/runs":{"get":{"operationId":"runs_list","parameters":[{"in":"path","name":"owner","required":true,"schema":{"type":"string"}},{"in":"path","name":"repo","required":true,"schema":{"type":"string"}},{"in":"query","name":"status","required":false,"schema":{"type":["string","null"]}},{"in":"query","name":"branch","required":false,"schema":{"type":["string","null"]}},{"description":"Only runs of this commit (a full sha).","in":"query","name":"commit","required":false,"schema":{"type":["string","null"]}},{"description":"Runs numbered below this: the previous page's `next_before`.","in":"query","name":"before","required":false,"schema":{"format":"int64","type":["integer","null"]}},{"description":"Up to 100; 30 by default.","in":"query","name":"limit","required":false,"schema":{"format":"int64","minimum":0,"type":["integer","null"]}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunList"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"summary":"A repository's runs, newest first.","tags":["runs"]},"post":{"operationId":"runs_create","parameters":[{"in":"path","name":"owner","required":true,"schema":{"type":"string"}},{"in":"path","name":"repo","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewRunRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartedRuns"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"`no_workflow`, `nothing_to_run`, or a job or workflow that is not there"}},"summary":"Runs the workflows as they are at a ref, now: every job a push runs, in every workflow (or\nthe one named), or the jobs named and what they need. One run per workflow.","tags":["runs"]}},"/api/v1/repos/{owner}/{repo}/runs/{number}":{"get":{"operationId":"runs_get","parameters":[{"in":"path","name":"owner","required":true,"schema":{"type":"string"}},{"in":"path","name":"repo","required":true,"schema":{"type":"string"}},{"in":"path","name":"number","required":true,"schema":{"format":"int64","type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunDetail"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"summary":"A run, with its jobs and their steps.","tags":["runs"]}},"/api/v1/repos/{owner}/{repo}/runs/{number}/cancel":{"post":{"operationId":"cancel","parameters":[{"in":"path","name":"owner","required":true,"schema":{"type":"string"}},{"in":"path","name":"repo","required":true,"schema":{"type":"string"}},{"in":"path","name":"number","required":true,"schema":{"format":"int64","type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunDetail"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"summary":"Cancels what of a run has not finished.","tags":["runs"]}},"/api/v1/repos/{owner}/{repo}/runs/{number}/jobs/{job}/log":{"get":{"operationId":"log","parameters":[{"in":"path","name":"owner","required":true,"schema":{"type":"string"}},{"in":"path","name":"repo","required":true,"schema":{"type":"string"}},{"in":"path","name":"number","required":true,"schema":{"format":"int64","type":"integer"}},{"in":"path","name":"job","required":true,"schema":{"type":"string"}},{"description":"Lines after this sequence number (the last one you have); from the start by default.","in":"query","name":"after","required":false,"schema":{"format":"int64","type":["integer","null"]}},{"description":"Up to 5000; 1000 by default.","in":"query","name":"limit","required":false,"schema":{"format":"int64","minimum":0,"type":["integer","null"]}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobLog"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"summary":"A job's log, from a point on.","tags":["runs"]}},"/api/v1/repos/{owner}/{repo}/runs/{number}/rerun":{"post":{"operationId":"rerun","parameters":[{"in":"path","name":"owner","required":true,"schema":{"type":"string"}},{"in":"path","name":"repo","required":true,"schema":{"type":"string"}},{"in":"path","name":"number","required":true,"schema":{"format":"int64","type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RerunRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunDetail"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"`run_in_progress`"}},"summary":"Runs a finished run again, as its next attempt.","tags":["runs"]}},"/api/v1/repos/{owner}/{repo}/stats":{"get":{"operationId":"stats","parameters":[{"in":"path","name":"owner","required":true,"schema":{"type":"string"}},{"in":"path","name":"repo","required":true,"schema":{"type":"string"}},{"description":"A branch, tag or commit sha. The default branch when left out.","in":"query","name":"ref","required":false,"schema":{"type":["string","null"]}},{"description":"A path in the tree, `/`-separated. The root when left out.","in":"query","name":"path","required":false,"schema":{"type":["string","null"]}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RepoStats"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"summary":"Counts and the language breakdown, for the repository page.","tags":["code"]}},"/api/v1/repos/{owner}/{repo}/tree":{"get":{"operationId":"tree","parameters":[{"in":"path","name":"owner","required":true,"schema":{"type":"string"}},{"in":"path","name":"repo","required":true,"schema":{"type":"string"}},{"description":"A branch, tag or commit sha. The default branch when left out.","in":"query","name":"ref","required":false,"schema":{"type":["string","null"]}},{"description":"A path in the tree, `/`-separated. The root when left out.","in":"query","name":"path","required":false,"schema":{"type":["string","null"]}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TreeOut"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"`ref_not_found`, `path_not_found`, or no such repository"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"`empty_repository`"}},"summary":"A directory: its entries with the last commit that changed each, and its README.","tags":["code"]}},"/api/v1/review/rules":{"get":{"operationId":"code_review_rules","responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/RuleInfo"},"type":"array"}}}}},"summary":"Every built-in Lorx Review rule: what it looks for, its category and the most severe it\nreports. From the engine itself, so it lists exactly what reviews can find.","tags":["code"]}},"/api/v1/runner/jobs/{id}/finish":{"post":{"operationId":"runners_finish","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FinishRequest"}}},"required":true},"responses":{"204":{},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"`job_not_held`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"summary":"Reports how a job went. 409 when the job is no longer this runner's to finish.","tags":["runners"]}},"/api/v1/runner/jobs/{id}/heartbeat":{"post":{"operationId":"runners_heartbeat","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Heartbeat"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"summary":"Keeps the lease on a job. `continue: false` means stop: it was cancelled, or given away.","tags":["runners"]}},"/api/v1/runner/jobs/{id}/logs":{"post":{"operationId":"runners_logs","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LogLines"}}},"required":true},"responses":{"204":{},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"summary":"Adds lines to a job's log, in order.","tags":["runners"]}},"/api/v1/runner/lease":{"post":{"operationId":"runners_lease","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeaseRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeasedJob"}}}},"204":{"description":"No job for it (or it is draining)"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"summary":"Asks for a job: the oldest queued one it can take (its labels include the job's) from the\nrepositories it serves. Waits up to `wait_secs` for one. 204 when there is none.","tags":["runners"]}},"/api/v1/runner/register":{"post":{"operationId":"runners_register","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Registered"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"`invalid_registration_token`: unknown, used or expired"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"summary":"Registers a runner: trades a registration token (once, within the hour) for its credential.","tags":["runners"]}},"/api/v1/user/identities":{"get":{"operationId":"identities","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IdentityList"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"summary":"Sign-in identities linked to your account.","tags":["account"]}},"/api/v1/user/identities/{id}":{"delete":{"operationId":"unlink","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"204":{},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"`step_up_required`"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"`last_sign_in_method`"}},"summary":"Unlinks a sign-in identity. Needs step-up; refused when it is the account's last way to sign\nin (no password and no other identity).","tags":["account"]}},"/api/v1/user/keys":{"get":{"operationId":"keys_list","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KeyList"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"`session_required`"}},"summary":"Your SSH keys, newest first.","tags":["account"]},"post":{"operationId":"keys_create","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewKeyRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KeyOut"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"`step_up_required` or `session_required`"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"`key_exists` (on this account) or `key_in_use` (on another)"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"`private_key` (a private key was pasted; nothing was stored) or `validation_failed`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"summary":"Adds an SSH key. Needs step-up. The account's owner is emailed.","tags":["account"]}},"/api/v1/user/keys/{id}":{"delete":{"operationId":"keys_delete","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"204":{},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"`session_required`"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"summary":"Removes a key. It stops working for git over SSH at once, and commits it signed show as\nunverified from then on.","tags":["account"]},"patch":{"operationId":"keys_update","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateKeyRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KeyOut"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"`step_up_required` or `session_required`"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"summary":"Renames a key or changes what it is for. Allowing git over SSH on a key that did not have\nit needs step-up, as adding a key does.","tags":["account"]}},"/api/v1/user/runners":{"get":{"operationId":"runners_list_mine","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunnerList"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"summary":"Your runners: your account's, and your repositories'. Newest first.","tags":["runners"]}},"/api/v1/user/runners/registration-token":{"post":{"operationId":"runners_account_registration_token","responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegistrationToken"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"`step_up_required`, or a token rather than a session"}},"summary":"A one-time token that registers a runner for every repository you own. Needs step-up.","tags":["runners"]}},"/api/v1/user/runners/{id}":{"delete":{"operationId":"runners_remove","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"204":{},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"summary":"Removes a runner: its credential stops working at once, and a job it holds goes back in the\nqueue for another runner.","tags":["runners"]}},"/api/v1/user/runners/{id}/drain":{"post":{"operationId":"runners_drain","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DrainRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunnerOut"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"summary":"Drains a runner (it finishes its job and takes no more), or undrains it.","tags":["runners"]}},"/api/v1/user/security-events":{"get":{"operationId":"security_events","parameters":[{"description":"The `next_cursor` of the previous page.","in":"query","name":"cursor","required":false,"schema":{"type":["string","null"]}},{"description":"Up to 100; 50 by default.","in":"query","name":"limit","required":false,"schema":{"format":"int64","minimum":0,"type":["integer","null"]}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SecurityEvents"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"summary":"Security events on your account, newest first: sign-ins (and failed ones), password resets\nand, from later steps, tokens, keys and factors.","tags":["account"]}},"/api/v1/user/tokens":{"get":{"operationId":"tokens_list","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenList"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"`session_required`"}},"summary":"Your tokens, newest first, with when and where each was last used.","tags":["account"]},"post":{"operationId":"tokens_create","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewTokenRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatedToken"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"`step_up_required` or `session_required`"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"summary":"Creates a personal access token. Needs step-up. The secret is in this response only.","tags":["account"]}},"/api/v1/user/tokens/{id}":{"delete":{"operationId":"tokens_delete","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"204":{},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"`session_required`"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"summary":"Revokes an active token (it stops working at once and stays listed as revoked), or removes\na revoked or expired one from the list.","tags":["account"]}},"/api/v1/user/tokens/{id}/renew":{"post":{"operationId":"renew","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenOut"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"`step_up_required` or `session_required`"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"`token_inactive` (revoked or expired) or `max_lifetime` (a year old)"}},"summary":"Extends a live token by 30 days, keeping its secret, up to a year after it was created.\nNeeds step-up.","tags":["account"]}},"/api/v1/users/{username}/activity":{"get":{"operationId":"activity","parameters":[{"in":"path","name":"username","required":true,"schema":{"type":"string"}},{"description":"Only activity before this instant: the previous page's `next_before`.","in":"query","name":"before","required":false,"schema":{"format":"date-time","type":["string","null"]}},{"description":"Up to 50 items; 20 by default.","in":"query","name":"limit","required":false,"schema":{"format":"int64","minimum":0,"type":["integer","null"]}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Activity"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"summary":"What an account has been doing, newest first: commits to default branches (grouped by\nrepository and day), change requests opened and merged, and reviews. Only what the viewer can\nread.","tags":["users"]}},"/api/v1/users/{username}/contributions":{"get":{"operationId":"contributions","parameters":[{"in":"path","name":"username","required":true,"schema":{"type":"string"}},{"description":"The first day, `YYYY-MM-DD` (default: a year before `to`).","in":"query","name":"from","required":false,"schema":{"format":"date","type":["string","null"]}},{"description":"The last day, `YYYY-MM-DD` (default: today, UTC).","in":"query","name":"to","required":false,"schema":{"format":"date","type":["string","null"]}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Contributions"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"summary":"An account's contributions over a range of days (a year by default): commits to default\nbranches (by the account's verified emails, on the author's own day), change requests\nopened and reviews given, with the repositories most recently committed to. Only what the\nviewer can read counts.","tags":["users"]}},"/api/v1/users/{username}/repos":{"get":{"operationId":"list_for_user","parameters":[{"in":"path","name":"username","required":true,"schema":{"type":"string"}},{"description":"The `next_cursor` of the previous page.","in":"query","name":"cursor","required":false,"schema":{"type":["string","null"]}},{"description":"Up to 100; 30 by default.","in":"query","name":"limit","required":false,"schema":{"format":"int64","minimum":0,"type":["integer","null"]}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RepoList"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"summary":"An account's repositories, newest first: public ones, plus private ones when they are yours.","tags":["repos"]}}},"tags":[{"description":"Server health and metadata","name":"meta"},{"description":"The signed-in account","name":"account"},{"description":"Sign up, verify, sign in and out, reset a password. Unsafe requests carry `x-csrf-token` (from `GET /auth/csrf`) unless they use a bearer token.","name":"auth"},{"description":"A repository's code: refs, trees, files, history, diffs, compare and blame. `?ref=` takes a branch, tag or commit sha; answers name the commit it resolved to.","name":"code"},{"description":"Live events as Server-Sent Events: what changed in the repositories and change requests a screen shows, as it happens, resumable with `Last-Event-ID`.","name":"events"},{"description":"Change requests: a branch proposed for merging into another, with a revision per push to it, compared against the merge base as `git diff base...head` is.","name":"change_requests"},{"description":"Runners: machines that lease CI jobs and run them. People issue one-time registration tokens and manage their runners; runners register, lease, heartbeat, send logs and finish jobs with their own `lorx_rc_` credential.","name":"runners"}]}