// Code generated by seatgen from the seat definitions; DO NOT EDIT. // The contract of the seat "git", defined whole (seats/git/seat.json): The forge: every read and act a delivery part makes of the mesh's git repositories, and what the forge says happened (design 47 *The seat git*, ADR 0596 §1, §2). A failed read answers an error, never an empty answer. The act verbs are the forge bridge's alone. export declare const seat: "git"; export declare const verbs: { readonly pull: "pull"; readonly branch: "branch"; readonly openPulls: "open-pulls"; readonly tags: "tags"; readonly trees: "trees"; readonly file: "file"; readonly contains: "contains"; readonly statuses: "statuses"; readonly status: "status"; readonly comment: "comment"; readonly view: "view"; readonly note: "note"; readonly mergePull: "merge-pull"; readonly tag: "tag"; }; export declare const events: { readonly pullUpdated: "pull-updated"; readonly pullMerged: "pull-merged"; readonly pullClosed: "pull-closed"; readonly forgePull: "forge-pull"; readonly forgeStatus: "forge-status"; readonly forgeDelete: "forge-delete"; readonly repoWritable: "repo-writable"; readonly branchMoved: "branch-moved"; }; export declare const family: { readonly name: "git.events"; readonly maxAgeDays: 7 }; export declare const pullUpdatedSubject: "mesh.seat.git.event.pull-updated"; export declare const pullMergedSubject: "mesh.seat.git.event.pull-merged"; export declare const pullClosedSubject: "mesh.seat.git.event.pull-closed"; export declare const forgePullSubject: "mesh.seat.git.event.forge-pull"; export declare const forgeStatusSubject: "mesh.seat.git.event.forge-status"; export declare const forgeDeleteSubject: "mesh.seat.git.event.forge-delete"; export declare const repoWritableSubject: "mesh.seat.git.event.repo-writable"; export declare const branchMovedStream: "SEAT_git_branch-moved"; export declare const branchMovedSubject: "mesh.seat.git.event.branch-moved"; export declare const states: { readonly failedSteps: "failed-steps"; }; /** The key of one value of the state failed-steps under the form "..". */ export declare function failedStepsByModuleFingerprintStepKey(module: string, fingerprint: string, step: string): string; /** The parts of a key of the form "..", or undefined for a key of another form. */ export declare function parseFailedStepsByModuleFingerprintStepKey(_key: string): { module: string; fingerprint: string; step: string } | undefined; /** what a pull request changed */ export interface Change { /** the changed directories that hold a module at its head; absent when they could not be read */ "module-dirs"?: string[]; /** the paths it changed */ "paths": string[]; /** the forge cut the list */ "paths-truncated"?: boolean; /** which of them it deleted */ "removed"?: string[]; } /** which kind of error, set with error alone: refused, the forge or the holder refused and error says why in the forge's own words; not-found, the forge said that what was asked about (a repository, a commit, a pull request, a branch or a tag) does not exist, so a caller never reads it out of error's words; failed, the forge failed or could not be reached, so the act or read could not be performed */ export type ErrorKind = "refused" | "not-found" | "failed"; /** a failed required step at a build-input fingerprint, with the commits it was seen at and the run that failed it (design 47 *Judged from its own state, never by a call*); cleared by a later passing rerun of that step whose proved caller is the operator or a healer */ export interface FailedStep { /** the artifact reference, : */ "artifact"?: string; "at"?: string; /** every commit it was seen at */ "commits": string[]; /** the build-input fingerprint the step failed at */ "fingerprint": string; "module": string; /** the run that failed it: the runner's pipeline key */ "run": string; /** why it failed, as the runner's step-ended said */ "said"?: string; "step": string; /** the layout version */ "v"?: number; } /** what the forge would merge now, for an open pull request (issues 1275, 1945; ADR 0441 §1): answered whole or not at all, and a read the forge could not make answers the verb's error, never a guess; absent for a merged or closed one */ export interface Merging { /** the forge's own word on whether it merges into its base now: false while it is in conflict with its base, or while the forge works that out after the base moved */ "mergeable": boolean; /** whether a protection rule guards its base branch */ "protected": boolean; /** the status contexts the base branch's protection requires; none when it requires none */ "required": string[]; /** whether the forge's merging account may write the repository: false, its statuses and its merge are refused */ "writes": boolean; } /** an open pull request, with the statuses its base requires and those its head has */ export interface OpenPull { /** the head's statuses by context, the newest of each */ "checks": Record; "pull": Pull; /** the contexts the base branch's protection requires; none when it requires none */ "required": string[]; } /** one pull request as the forge holds it; never its description (ADR 0659 §1) */ export interface Pull { /** who opened it, the forge's login */ "author"?: string; /** the branch it merges into */ "base": string; /** its head branch: what a delivery group is named by */ "branch": string; /** a commit, its full 40-hex sha */ "head": string; /** the merge commit, once merged */ "merge-commit"?: string; /** when it merged */ "merged-at"?: string; /** the pull request's number */ "number": number; /** the repository, / */ "repository": string; /** open, merged or closed */ "state": "open" | "merged" | "closed"; /** its title */ "title"?: string; /** its page on the forge */ "url"?: string; } /** the newest status of one context on a commit */ export interface Status { /** when it was set */ "at"?: string; /** who set it */ "by"?: string; /** the status's context, such as mesh/check */ "context": string; /** what it says */ "description"?: string; /** pending, success, failure, error or warning */ "state": string; /** the page it links to */ "target"?: string; } /** is what pull takes. */ export interface PullInput { /** instead of the number: the merge commit it made */ "merge-commit"?: string; /** its number */ "number"?: number; /** the repository, / */ "repository": string; } /** is what pull answers. */ export interface PullAnswer { /** why the forge could not answer, or refused: set alone with error-kind, and a caller reads it as a failure, never as none */ "error"?: string; "error-kind"?: ErrorKind; "merging"?: Merging; "pull"?: Pull; } /** is what branch takes. */ export interface BranchInput { "branch": string; /** the repository, / */ "repository": string; } /** is what branch answers. */ export interface BranchAnswer { "branch"?: string; /** why the forge could not answer, or refused: set alone with error-kind, and a caller reads it as a failure, never as none */ "error"?: string; "error-kind"?: ErrorKind; /** a commit, its full 40-hex sha */ "head"?: string; /** a protection rule refuses a direct push and admits only merges */ "protected"?: boolean; "repository"?: string; } /** is what open-pulls takes. */ export interface OpenPullsInput { } /** is what open-pulls answers. */ export interface OpenPullsAnswer { /** why the forge could not answer, or refused: set alone with error-kind, and a caller reads it as a failure, never as none */ "error"?: string; "error-kind"?: ErrorKind; /** every open pull request; said empty when none is open, so an answer that lacks it is never read as none */ "pulls": OpenPull[]; } /** is what tags takes. */ export interface TagsInput { /** the page, from 1 */ "page"?: number; /** only tags starting with it */ "prefix"?: string; /** the repository, / */ "repository": string; } /** is what tags answers. */ export interface TagsAnswer { /** how many tags a page holds */ "bound"?: number; /** why the forge could not answer, or refused: set alone with error-kind, and a caller reads it as a failure, never as none */ "error"?: string; "error-kind"?: ErrorKind; /** another page exists */ "more"?: boolean; /** the page */ "page"?: number; /** the repository, / */ "repository"?: string; /** the tags of this page */ "tags"?: string[]; } /** is what trees takes. */ export interface TreesInput { /** a commit, its full 40-hex sha */ "commit": string; /** directories whose every blob is answered; the root is the empty name */ "files"?: string[]; /** {directory: [path relative to it]}; the root is the empty name */ "paths"?: Record; /** the repository, / */ "repository": string; } /** is what trees answers. */ export interface TreesAnswer { /** a commit, its full 40-hex sha */ "commit"?: string; /** why the forge could not answer, or refused: set alone with error-kind, and a caller reads it as a failure, never as none */ "error"?: string; "error-kind"?: ErrorKind; /** directory to {path: blob id} */ "files"?: Record>; /** directory to {path: object id} */ "paths"?: Record>; /** the root tree's hash */ "root"?: string; /** directory to its tree's hash, the root as the empty name */ "trees"?: Record; } /** is what file takes. */ export interface FileInput { /** the file's path from the repository's root */ "path": string; /** a commit, branch or tag; the default branch when absent */ "ref"?: string; /** the repository, / */ "repository": string; } /** is what file answers. */ export interface FileAnswer { /** the forge holds no such file there */ "absent"?: boolean; /** the file's git blob id */ "blob"?: string; /** its content */ "content"?: string; /** why the forge could not answer, or refused: set alone with error-kind, and a caller reads it as a failure, never as none */ "error"?: string; "error-kind"?: ErrorKind; /** the path */ "path"?: string; /** what was read */ "ref"?: string; /** its size in bytes */ "size"?: number; } /** is what contains takes. */ export interface ContainsInput { /** the commit asked about */ "commit": string; /** the commit it may be contained in */ "in": string; /** the repository, / */ "repository": string; } /** is what contains answers. */ export interface ContainsAnswer { /** how many commits commit is ahead of in */ "ahead"?: number; /** the commit */ "commit"?: string; /** in contains commit */ "contains"?: boolean; /** why the forge could not answer, or refused: set alone with error-kind, and a caller reads it as a failure, never as none */ "error"?: string; "error-kind"?: ErrorKind; /** the other */ "in"?: string; } /** is what statuses takes. */ export interface StatusesInput { /** a commit, its full 40-hex sha */ "commit": string; /** the repository, / */ "repository": string; } /** is what statuses answers. */ export interface StatusesAnswer { /** the forge's combined state */ "combined"?: string; /** a commit, its full 40-hex sha */ "commit"?: string; /** why the forge could not answer, or refused: set alone with error-kind, and a caller reads it as a failure, never as none */ "error"?: string; "error-kind"?: ErrorKind; /** the newest of each context */ "statuses"?: Status[]; } /** is what status takes. */ export interface StatusInput { /** a commit, its full 40-hex sha */ "commit": string; /** the context, such as mesh/check */ "context": string; /** what it says */ "description"?: string; /** the act's id */ "id": string; /** the repository, / */ "repository": string; /** the state */ "state": "pending" | "success" | "failure" | "error" | "warning"; /** the page it links to */ "target"?: string; } /** is what status answers. */ export interface StatusAnswer { /** why the forge could not answer, or refused: set alone with error-kind, and a caller reads it as a failure, never as none */ "error"?: string; "error-kind"?: ErrorKind; /** the id was already held on the pull request or the note, so nothing was done again */ "held"?: boolean; /** the act's id, as the caller gave it */ "id"?: string; /** the forge holds the act now */ "performed"?: boolean; } /** is what comment takes. */ export interface CommentInput { /** the act's id */ "id": string; /** the pull request's number */ "number": number; /** the repository, / */ "repository": string; /** the comment, markdown */ "text": string; } /** is what comment answers. */ export interface CommentAnswer { /** why the forge could not answer, or refused: set alone with error-kind, and a caller reads it as a failure, never as none */ "error"?: string; "error-kind"?: ErrorKind; /** the id was already held on the pull request or the note, so nothing was done again */ "held"?: boolean; /** the act's id, as the caller gave it */ "id"?: string; /** the forge holds the act now */ "performed"?: boolean; } /** is what view takes. */ export interface ViewInput { /** the act's id */ "id": string; /** the pull request's number */ "number": number; /** the repository, / */ "repository": string; /** the view, markdown */ "text": string; } /** is what view answers. */ export interface ViewAnswer { /** why the forge could not answer, or refused: set alone with error-kind, and a caller reads it as a failure, never as none */ "error"?: string; "error-kind"?: ErrorKind; /** the id was already held on the pull request or the note, so nothing was done again */ "held"?: boolean; /** the act's id, as the caller gave it */ "id"?: string; /** the forge holds the act now */ "performed"?: boolean; } /** is what note takes. */ export interface NoteInput { /** a commit, its full 40-hex sha */ "commit": string; /** the act's id */ "id": string; /** the line, one line */ "line": string; /** the repository, / */ "repository": string; } /** is what note answers. */ export interface NoteAnswer { /** why the forge could not answer, or refused: set alone with error-kind, and a caller reads it as a failure, never as none */ "error"?: string; "error-kind"?: ErrorKind; /** the id was already held on the pull request or the note, so nothing was done again */ "held"?: boolean; /** the act's id, as the caller gave it */ "id"?: string; /** the forge holds the act now */ "performed"?: boolean; } /** is what merge-pull takes. */ export interface MergePullInput { /** the head the caller names */ "head": string; /** the act's id */ "id": string; /** the pull request's number */ "number": number; /** the repository, / */ "repository": string; } /** is what merge-pull answers. */ export interface MergePullAnswer { /** why the forge could not answer, or refused: set alone with error-kind, and a caller reads it as a failure, never as none */ "error"?: string; "error-kind"?: ErrorKind; /** the id was already held on the pull request or the note, so nothing was done again */ "held"?: boolean; /** the act's id, as the caller gave it */ "id"?: string; /** the merge commit */ "merge-commit"?: string; /** for policy-failed, the module */ "module"?: string; /** the forge holds the act now */ "performed"?: boolean; /** why the forge or the holder refused the merge; the act is not performed */ "refused"?: string; /** which refusal, set with refused: head-moved, the pull request's head is not the one named; unprotected, the base branch's protection does not refuse a direct push; policy-failed, a run at the head's fingerprint failed a required step (run, module and step name it); no-registrations, no registration-changed heard yet (ADR 0667 section 10); git-refused, git refused the merge */ "refused-kind"?: "head-moved" | "unprotected" | "policy-failed" | "no-registrations" | "git-refused"; /** for policy-failed, the run that failed the step: the runner's pipeline key */ "run"?: string; /** for policy-failed, the step */ "step"?: string; } /** is what tag takes. */ export interface TagInput { /** the commit it is written at */ "commit": string; /** the repository, / */ "repository": string; /** the tag */ "tag": string; } /** is what tag answers. */ export interface TagAnswer { /** why the forge could not write it: set alone with error-kind */ "error"?: string; "error-kind"?: ErrorKind; /** the forge holds the tag at that commit now */ "performed"?: boolean; /** the tag, as asked */ "tag"?: string; } /** is the body of the event pull-updated. */ export interface PullUpdatedEvent { /** who opened it */ "author"?: string; /** the branch it merges into */ "base": string; /** the base branch's head as the head was announced; absent when it could not be read */ "base-head"?: string; /** its head branch */ "branch": string; "change"?: Change; /** a commit, its full 40-hex sha */ "head": string; /** the pull request's number */ "number": number; /** the repository, / */ "repository": string; /** its title */ "title"?: string; /** its page */ "url"?: string; } /** is the body of the event pull-merged. */ export interface PullMergedEvent { /** who opened it */ "author"?: string; /** the branch it merges into */ "base": string; /** its head branch */ "branch": string; "change"?: Change; /** a commit, its full 40-hex sha */ "head": string; /** the head's statuses by context, their states; absent when they could not be read */ "head-checks"?: Record; /** a commit, its full 40-hex sha */ "merge-commit": string; /** when */ "merged-at"?: string; /** the pull request's number */ "number": number; /** the repository, / */ "repository": string; /** its title */ "title"?: string; /** its page */ "url"?: string; } /** is the body of the event pull-closed. */ export interface PullClosedEvent { /** who opened it */ "author"?: string; /** the branch it merges into */ "base": string; /** its head branch */ "branch": string; /** a commit, its full 40-hex sha */ "head": string; /** the pull request's number */ "number": number; /** the repository, / */ "repository": string; /** its title */ "title"?: string; /** its page */ "url"?: string; } /** is the body of the event forge-pull. */ export interface ForgePullEvent { /** what the forge said: opened, reopened, synchronized, edited, closed, merged */ "action": string; /** who opened it */ "author"?: string; /** its base branch */ "base"?: string; /** its head branch */ "branch"?: string; /** its head commit */ "head"?: string; /** the merge commit */ "merge-commit"?: string; /** merged */ "merged"?: boolean; /** its number */ "number": number; /** the repository, / */ "repository": string; /** who acted */ "sender"?: string; } /** is the body of the event forge-status. */ export interface ForgeStatusEvent { /** the commit */ "commit": string; /** the context */ "context": string; /** what it says */ "description"?: string; /** the repository, / */ "repository": string; /** who set it */ "sender"?: string; /** the state */ "state": string; } /** is the body of the event forge-delete. */ export interface ForgeDeleteEvent { /** the deleted branch or tag */ "ref": string; /** branch or tag */ "ref-type"?: string; /** the repository, / */ "repository": string; /** who deleted it */ "sender"?: string; } /** is the body of the event repo-writable. */ export interface RepoWritableEvent { /** the account that writes it now */ "account": string; /** the repository, / */ "repository": string; } /** is the body of the event branch-moved. */ export interface BranchMovedEvent { "at"?: string; "branch": string; /** the head the webhook said, a commit's full 40-hex sha; read again by branch */ "head"?: string; /** the repository, / */ "repository": string; } /** is one value of the state failed-steps under the key ... */ export type FailedStepsByModuleFingerprintStepValue = FailedStep;