// Code generated by seatgen from the seat definitions; DO NOT EDIT. // Package git is 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. package git import ( "bytes" "encoding/json" "errors" "strings" "time" ) // Seat is the seat's name. const Seat = "git" const ( VerbPull = "pull" VerbBranch = "branch" VerbOpenPulls = "open-pulls" VerbTags = "tags" VerbTrees = "trees" VerbFile = "file" VerbContains = "contains" VerbStatuses = "statuses" VerbStatus = "status" VerbComment = "comment" VerbView = "view" VerbNote = "note" VerbMergePull = "merge-pull" VerbTag = "tag" ) const ( EventPullUpdated = "pull-updated" EventPullMerged = "pull-merged" EventPullClosed = "pull-closed" EventForgePull = "forge-pull" EventForgeStatus = "forge-status" EventForgeDelete = "forge-delete" EventRepoWritable = "repo-writable" EventBranchMoved = "branch-moved" EventMergeCalled = "merge-called" ) // Verbs is every verb the seat serves, in its definition's order: a new copy each call. func Verbs() []string { return []string{VerbPull, VerbBranch, VerbOpenPulls, VerbTags, VerbTrees, VerbFile, VerbContains, VerbStatuses, VerbStatus, VerbComment, VerbView, VerbNote, VerbMergePull, VerbTag} } // Events is every event published on the seat's subject: a new copy each call. func Events() []string { return []string{EventPullUpdated, EventPullMerged, EventPullClosed, EventForgePull, EventForgeStatus, EventForgeDelete, EventRepoWritable, EventBranchMoved, EventMergeCalled} } // Family is where the seat's events are kept: the shared events stream, filtered to the seat's subjects. const ( Family = "git.events" FamilyMaxAgeDays = 7 ) // SubjectPullUpdated is where pull-updated is published. const SubjectPullUpdated = "mesh.seat.git.event.pull-updated" // SubjectPullMerged is where pull-merged is published. const SubjectPullMerged = "mesh.seat.git.event.pull-merged" // SubjectPullClosed is where pull-closed is published. const SubjectPullClosed = "mesh.seat.git.event.pull-closed" // SubjectForgePull is where forge-pull is published. const SubjectForgePull = "mesh.seat.git.event.forge-pull" // SubjectForgeStatus is where forge-status is published. const SubjectForgeStatus = "mesh.seat.git.event.forge-status" // SubjectForgeDelete is where forge-delete is published. const SubjectForgeDelete = "mesh.seat.git.event.forge-delete" // SubjectRepoWritable is where repo-writable is published. const SubjectRepoWritable = "mesh.seat.git.event.repo-writable" // StreamBranchMoved is the stream branch-moved is kept in. const StreamBranchMoved = "SEAT_git_branch-moved" // SubjectBranchMoved is where branch-moved is published. const SubjectBranchMoved = "mesh.seat.git.event.branch-moved" // StreamMergeCalled is the stream merge-called is kept in. const StreamMergeCalled = "SEAT_git_merge-called" // SubjectMergeCalled is where merge-called is published, on mesh.seat.git.event.merge-called.. func SubjectMergeCalled(call string) string { return "mesh.seat.git.event.merge-called." + call } // SubjectMergeCalledAll hears every merge-called. const SubjectMergeCalledAll = "mesh.seat.git.event.merge-called.*" const ( StateFailedSteps = "failed-steps" StateCalls = "calls" ) // FailedStepsByModuleFingerprintStepKey is the key of one value of the state failed-steps under the form "..". func FailedStepsByModuleFingerprintStepKey(module, fingerprint, step string) string { return module + "." + fingerprint + "." + step } // ParseFailedStepsByModuleFingerprintStepKey reads the parts of a key of the form "..", in the order of the form; the last result is false for a key of another form. func ParseFailedStepsByModuleFingerprintStepKey(key string) (string, string, string, bool) { rest := key v0, after0, found0 := strings.Cut(rest, ".") if !found0 || v0 == "" { return "", "", "", false } rest = after0 v2, after2, found2 := strings.Cut(rest, ".") if !found2 || v2 == "" { return "", "", "", false } rest = after2 if rest == "" { return "", "", "", false } v4 := rest rest = "" if rest != "" { return "", "", "", false } return v0, v2, v4, true } // DecodeFailedStepsByModuleFingerprintStepValue reads one value of the state failed-steps under the form "..", refusing a field FailedStepsByModuleFingerprintStepValue does not know and any text after the value. func DecodeFailedStepsByModuleFingerprintStepValue(raw []byte) (FailedStepsByModuleFingerprintStepValue, error) { var v FailedStepsByModuleFingerprintStepValue dec := json.NewDecoder(bytes.NewReader(raw)) dec.DisallowUnknownFields() if err := dec.Decode(&v); err != nil { return v, err } if dec.More() { return v, errors.New("text after the value") } return v, nil } // CallsByCallCallKey is the key of one value of the state calls under the form "call.". func CallsByCallCallKey(call string) string { return "call." + call } // ParseCallsByCallCallKey reads the parts of a key of the form "call.", in the order of the form; the last result is false for a key of another form. func ParseCallsByCallCallKey(key string) (string, bool) { rest := key if !strings.HasPrefix(rest, "call.") { return "", false } rest = rest[5:] if rest == "" { return "", false } v1 := rest rest = "" if rest != "" { return "", false } return v1, true } // DecodeCallsByCallCallValue reads one value of the state calls under the form "call.", refusing a field CallsByCallCallValue does not know and any text after the value. func DecodeCallsByCallCallValue(raw []byte) (CallsByCallCallValue, error) { var v CallsByCallCallValue dec := json.NewDecoder(bytes.NewReader(raw)) dec.DisallowUnknownFields() if err := dec.Decode(&v); err != nil { return v, err } if dec.More() { return v, errors.New("text after the value") } return v, nil } // Call is one merge call, written before its first merge and updated as each member merges (design 47 H §766). type Call struct { // the bus account the tool runner proved for the call Account string `json:"account"` At time.Time `json:"at"` // the caller as who@node By string `json:"by"` Members []CallMember `json:"members"` // merge-called was said for it Said bool `json:"said"` } // CallMember is one member of a kept call. type CallMember struct { // the pull request's base, a watched branch, read at judging Branch string `json:"branch"` // for merged, the merge commit Commit string `json:"commit,omitempty"` Head string `json:"head"` Number int64 `json:"number"` Repository string `json:"repository"` State string `json:"state"` // for refused, why Why string `json:"why,omitempty"` } // The values of CallMember's state. const ( CallMemberStateJudged = "judged" CallMemberStateMerged = "merged" CallMemberStateRefused = "refused" ) // Change is what a pull request changed. type Change struct { // the changed directories that hold a module at its head; absent when they could not be read ModuleDirs []string `json:"module-dirs,omitempty"` // the paths it changed Paths []string `json:"paths"` // the forge cut the list PathsTruncated bool `json:"paths-truncated,omitempty"` // which of them it deleted Removed []string `json:"removed,omitempty"` } // ErrorKind is 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. type ErrorKind = string // The values of ErrorKind. const ( ErrorKindRefused = "refused" ErrorKindNotFound = "not-found" ErrorKindFailed = "failed" ) // FailedStep is 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. type FailedStep struct { // the artifact reference, : Artifact string `json:"artifact,omitempty"` At *time.Time `json:"at,omitempty"` // every commit it was seen at Commits []string `json:"commits"` // the build-input fingerprint the step failed at Fingerprint string `json:"fingerprint"` Module string `json:"module"` // the run that failed it: the runner's pipeline key Run string `json:"run"` // why it failed, as the runner's step-ended said Said string `json:"said,omitempty"` Step string `json:"step"` // the layout version V int64 `json:"v,omitempty"` } // MemberOutcome is one member of a merge call and where it stands (design 47 H §766, H-A-22). type MemberOutcome struct { // for merged, the merge commit; for a member refused already-merged, its commit Commit string `json:"commit,omitempty"` Number int64 `json:"number"` Repository string `json:"repository"` // judged, judged and not merged; merged, with its commit; refused, with why State string `json:"state"` // for refused, why, naming the step for a failed required step Why string `json:"why,omitempty"` } // The values of MemberOutcome's state. const ( MemberOutcomeStateJudged = "judged" MemberOutcomeStateMerged = "merged" MemberOutcomeStateRefused = "refused" ) // Merging is 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. type Merging struct { // 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 bool `json:"mergeable"` // whether a protection rule guards its base branch Protected bool `json:"protected"` // the status contexts the base branch's protection requires; none when it requires none Required []string `json:"required"` // whether the forge's merging account may write the repository: false, its statuses and its merge are refused Writes bool `json:"writes"` } // OpenPull is an open pull request, with the statuses its base requires and those its head has. type OpenPull struct { // the head's statuses by context, the newest of each Checks map[string]Status `json:"checks"` Pull Pull `json:"pull"` // the contexts the base branch's protection requires; none when it requires none Required []string `json:"required"` } // Pull is one pull request as the forge holds it; never its description (ADR 0659 §1). type Pull struct { // who opened it, the forge's login Author string `json:"author,omitempty"` // the branch it merges into Base string `json:"base"` // its head branch: what a delivery group is named by Branch string `json:"branch"` // a commit, its full 40-hex sha Head string `json:"head"` // the merge commit, once merged MergeCommit string `json:"merge-commit,omitempty"` // when it merged MergedAt *time.Time `json:"merged-at,omitempty"` // the pull request's number Number int64 `json:"number"` // the repository, / Repository string `json:"repository"` // open, merged or closed State string `json:"state"` // its title Title string `json:"title,omitempty"` // its page on the forge URL string `json:"url,omitempty"` } // The values of Pull's state. const ( PullStateOpen = "open" PullStateMerged = "merged" PullStateClosed = "closed" ) // Status is the newest status of one context on a commit. type Status struct { // when it was set At *time.Time `json:"at,omitempty"` // who set it By string `json:"by,omitempty"` // the status's context, such as mesh/check Context string `json:"context"` // what it says Description string `json:"description,omitempty"` // pending, success, failure, error or warning State string `json:"state"` // the page it links to Target string `json:"target,omitempty"` } // MergeCalledMembersItem is a type of the contract. type MergeCalledMembersItem struct { // the pull request's base, a watched branch Branch string `json:"branch"` // the merge commit the forge records for the pull request Commit string `json:"commit"` Head string `json:"head"` Number int64 `json:"number"` Repository string `json:"repository"` } // MergeCalledRefusedItem is a type of the contract. type MergeCalledRefusedItem struct { Number int64 `json:"number"` Repository string `json:"repository"` Why string `json:"why"` } // MergeCalled is a merge call's members merged or refused, said once by the forge module (design 47 H §736, §767). type MergeCalled struct { // the bus account the tool runner proved Account string `json:"account"` // the time of the last merge At time.Time `json:"at"` // the caller as who@node By string `json:"by"` // the merge call, 16 lowercase hex characters made once per call Call string `json:"call"` // one per landed member Members []MergeCalledMembersItem `json:"members"` // one per member not merged after every member was judged (design 47 H §767) Refused []MergeCalledRefusedItem `json:"refused,omitempty"` } // PullInput is what pull takes. type PullInput struct { // instead of the number: the merge commit it made MergeCommit string `json:"merge-commit,omitempty"` // its number Number int64 `json:"number,omitempty"` // the repository, / Repository string `json:"repository"` } // PullAnswer is what pull answers. type PullAnswer struct { // 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 `json:"error,omitempty"` ErrorKind ErrorKind `json:"error-kind,omitempty"` Merging *Merging `json:"merging,omitempty"` Pull *Pull `json:"pull,omitempty"` } // BranchInput is what branch takes. type BranchInput struct { Branch string `json:"branch"` // the repository, / Repository string `json:"repository"` } // BranchAnswer is what branch answers. type BranchAnswer struct { Branch string `json:"branch,omitempty"` // 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 `json:"error,omitempty"` ErrorKind ErrorKind `json:"error-kind,omitempty"` // a commit, its full 40-hex sha Head string `json:"head,omitempty"` Repository string `json:"repository,omitempty"` } // OpenPullsInput is what open-pulls takes. type OpenPullsInput struct { } // OpenPullsAnswer is what open-pulls answers. type OpenPullsAnswer struct { // 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 `json:"error,omitempty"` ErrorKind ErrorKind `json:"error-kind,omitempty"` // every open pull request; said empty when none is open, so an answer that lacks it is never read as none Pulls []OpenPull `json:"pulls"` } // TagsInput is what tags takes. type TagsInput struct { // the page, from 1 Page int64 `json:"page,omitempty"` // only tags starting with it Prefix string `json:"prefix,omitempty"` // the repository, / Repository string `json:"repository"` } // TagsAnswer is what tags answers. type TagsAnswer struct { // how many tags a page holds Bound int64 `json:"bound,omitempty"` // 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 `json:"error,omitempty"` ErrorKind ErrorKind `json:"error-kind,omitempty"` // another page exists More bool `json:"more,omitempty"` // the page Page int64 `json:"page,omitempty"` // the repository, / Repository string `json:"repository,omitempty"` // the tags of this page Tags []string `json:"tags,omitempty"` } // TreesInput is what trees takes. type TreesInput struct { // a commit, its full 40-hex sha Commit string `json:"commit"` // directories whose every blob is answered; the root is the empty name Files []string `json:"files,omitempty"` // {directory: [path relative to it]}; the root is the empty name Paths map[string][]string `json:"paths,omitempty"` // the repository, / Repository string `json:"repository"` } // TreesAnswer is what trees answers. type TreesAnswer struct { // a commit, its full 40-hex sha Commit string `json:"commit,omitempty"` // 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 `json:"error,omitempty"` ErrorKind ErrorKind `json:"error-kind,omitempty"` // directory to {path: blob id} Files map[string]map[string]string `json:"files,omitempty"` // directory to {path: object id} Paths map[string]map[string]string `json:"paths,omitempty"` // the root tree's hash Root string `json:"root,omitempty"` // directory to its tree's hash, the root as the empty name Trees map[string]string `json:"trees,omitempty"` } // FileInput is what file takes. type FileInput struct { // the file's path from the repository's root Path string `json:"path"` // a commit, branch or tag; the default branch when absent Ref string `json:"ref,omitempty"` // the repository, / Repository string `json:"repository"` } // FileAnswer is what file answers. type FileAnswer struct { // the forge holds no such file there Absent bool `json:"absent,omitempty"` // the file's git blob id Blob string `json:"blob,omitempty"` // its content Content string `json:"content,omitempty"` // 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 `json:"error,omitempty"` ErrorKind ErrorKind `json:"error-kind,omitempty"` // the path Path string `json:"path,omitempty"` // what was read Ref string `json:"ref,omitempty"` // its size in bytes Size int64 `json:"size,omitempty"` } // ContainsInput is what contains takes. type ContainsInput struct { // the commit asked about Commit string `json:"commit"` // the commit it may be contained in In string `json:"in"` // the repository, / Repository string `json:"repository"` } // ContainsAnswer is what contains answers. type ContainsAnswer struct { // how many commits commit is ahead of in Ahead int64 `json:"ahead,omitempty"` // the commit Commit string `json:"commit,omitempty"` // in contains commit Contains bool `json:"contains,omitempty"` // 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 `json:"error,omitempty"` ErrorKind ErrorKind `json:"error-kind,omitempty"` // the other In string `json:"in,omitempty"` } // StatusesInput is what statuses takes. type StatusesInput struct { // a commit, its full 40-hex sha Commit string `json:"commit"` // the repository, / Repository string `json:"repository"` } // StatusesAnswer is what statuses answers. type StatusesAnswer struct { // the forge's combined state Combined string `json:"combined,omitempty"` // a commit, its full 40-hex sha Commit string `json:"commit,omitempty"` // 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 `json:"error,omitempty"` ErrorKind ErrorKind `json:"error-kind,omitempty"` // the newest of each context Statuses []Status `json:"statuses,omitempty"` } // StatusInput is what status takes. type StatusInput struct { // a commit, its full 40-hex sha Commit string `json:"commit"` // the context, such as mesh/check Context string `json:"context"` // what it says Description string `json:"description,omitempty"` // the act's id ID string `json:"id"` // the repository, / Repository string `json:"repository"` // the state State string `json:"state"` // the page it links to Target string `json:"target,omitempty"` } // The values of StatusInput's state. const ( StatusInputStatePending = "pending" StatusInputStateSuccess = "success" StatusInputStateFailure = "failure" StatusInputStateError = "error" StatusInputStateWarning = "warning" ) // StatusAnswer is what status answers. type StatusAnswer struct { // 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 `json:"error,omitempty"` ErrorKind ErrorKind `json:"error-kind,omitempty"` // the id was already held on the pull request or the note, so nothing was done again Held bool `json:"held,omitempty"` // the act's id, as the caller gave it ID string `json:"id,omitempty"` // the forge holds the act now Performed bool `json:"performed,omitempty"` } // CommentInput is what comment takes. type CommentInput struct { // the act's id ID string `json:"id"` // the pull request's number Number int64 `json:"number"` // the repository, / Repository string `json:"repository"` // the comment, markdown Text string `json:"text"` } // CommentAnswer is what comment answers. type CommentAnswer struct { // 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 `json:"error,omitempty"` ErrorKind ErrorKind `json:"error-kind,omitempty"` // the id was already held on the pull request or the note, so nothing was done again Held bool `json:"held,omitempty"` // the act's id, as the caller gave it ID string `json:"id,omitempty"` // the forge holds the act now Performed bool `json:"performed,omitempty"` } // ViewInput is what view takes. type ViewInput struct { // the act's id ID string `json:"id"` // the pull request's number Number int64 `json:"number"` // the repository, / Repository string `json:"repository"` // the view, markdown Text string `json:"text"` } // ViewAnswer is what view answers. type ViewAnswer struct { // 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 `json:"error,omitempty"` ErrorKind ErrorKind `json:"error-kind,omitempty"` // the id was already held on the pull request or the note, so nothing was done again Held bool `json:"held,omitempty"` // the act's id, as the caller gave it ID string `json:"id,omitempty"` // the forge holds the act now Performed bool `json:"performed,omitempty"` } // NoteInput is what note takes. type NoteInput struct { // a commit, its full 40-hex sha Commit string `json:"commit"` // the act's id ID string `json:"id"` // the line, one line Line string `json:"line"` // the repository, / Repository string `json:"repository"` } // NoteAnswer is what note answers. type NoteAnswer struct { // 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 `json:"error,omitempty"` ErrorKind ErrorKind `json:"error-kind,omitempty"` // the id was already held on the pull request or the note, so nothing was done again Held bool `json:"held,omitempty"` // the act's id, as the caller gave it ID string `json:"id,omitempty"` // the forge holds the act now Performed bool `json:"performed,omitempty"` } // MergePullInputPullsItem is a type of the contract. type MergePullInputPullsItem struct { // the head the caller names Head string `json:"head"` // the pull request's number Number int64 `json:"number"` // the repository, / Repository string `json:"repository"` } // MergePullInput is what merge-pull takes. type MergePullInput struct { // the caller as who@node, recorded beside the bus account the tool runner proves By string `json:"by"` // the members, in the order they are merged Pulls []MergePullInputPullsItem `json:"pulls"` } // MergePullAnswer is what merge-pull answers. type MergePullAnswer struct { // the merge call, 16 lowercase hex characters made once per call Call string `json:"call,omitempty"` // 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 `json:"error,omitempty"` ErrorKind ErrorKind `json:"error-kind,omitempty"` // each member's outcome, in the order named Members []MemberOutcome `json:"members,omitempty"` } // TagInput is what tag takes. type TagInput struct { // the commit it is written at Commit string `json:"commit"` // the repository, / Repository string `json:"repository"` // the tag Tag string `json:"tag"` } // TagAnswer is what tag answers. type TagAnswer struct { // why the forge could not write it: set alone with error-kind Error string `json:"error,omitempty"` ErrorKind ErrorKind `json:"error-kind,omitempty"` // the forge holds the tag at that commit now Performed bool `json:"performed,omitempty"` // the tag, as asked Tag string `json:"tag,omitempty"` } // PullUpdatedEvent is the body of the event pull-updated. type PullUpdatedEvent struct { // who opened it Author string `json:"author,omitempty"` // the branch it merges into Base string `json:"base"` // the base branch's head as the head was announced; absent when it could not be read BaseHead string `json:"base-head,omitempty"` // its head branch Branch string `json:"branch"` Change *Change `json:"change,omitempty"` // a commit, its full 40-hex sha Head string `json:"head"` // the pull request's number Number int64 `json:"number"` // the repository, / Repository string `json:"repository"` // its title Title string `json:"title,omitempty"` // its page URL string `json:"url,omitempty"` } // PullMergedEvent is the body of the event pull-merged. type PullMergedEvent struct { // who opened it Author string `json:"author,omitempty"` // the branch it merges into Base string `json:"base"` // its head branch Branch string `json:"branch"` Change *Change `json:"change,omitempty"` // a commit, its full 40-hex sha Head string `json:"head"` // the head's statuses by context, their states; absent when they could not be read HeadChecks map[string]string `json:"head-checks,omitempty"` // a commit, its full 40-hex sha MergeCommit string `json:"merge-commit"` // when MergedAt *time.Time `json:"merged-at,omitempty"` // the pull request's number Number int64 `json:"number"` // the repository, / Repository string `json:"repository"` // its title Title string `json:"title,omitempty"` // its page URL string `json:"url,omitempty"` } // PullClosedEvent is the body of the event pull-closed. type PullClosedEvent struct { // who opened it Author string `json:"author,omitempty"` // the branch it merges into Base string `json:"base"` // its head branch Branch string `json:"branch"` // a commit, its full 40-hex sha Head string `json:"head"` // the pull request's number Number int64 `json:"number"` // the repository, / Repository string `json:"repository"` // its title Title string `json:"title,omitempty"` // its page URL string `json:"url,omitempty"` } // ForgePullEvent is the body of the event forge-pull. type ForgePullEvent struct { // what the forge said: opened, reopened, synchronized, edited, closed, merged Action string `json:"action"` // who opened it Author string `json:"author,omitempty"` // its base branch Base string `json:"base,omitempty"` // its head branch Branch string `json:"branch,omitempty"` // its head commit Head string `json:"head,omitempty"` // the merge commit MergeCommit string `json:"merge-commit,omitempty"` // merged Merged bool `json:"merged,omitempty"` // its number Number int64 `json:"number"` // the repository, / Repository string `json:"repository"` // who acted Sender string `json:"sender,omitempty"` } // ForgeStatusEvent is the body of the event forge-status. type ForgeStatusEvent struct { // the commit Commit string `json:"commit"` // the context Context string `json:"context"` // what it says Description string `json:"description,omitempty"` // the repository, / Repository string `json:"repository"` // who set it Sender string `json:"sender,omitempty"` // the state State string `json:"state"` } // ForgeDeleteEvent is the body of the event forge-delete. type ForgeDeleteEvent struct { // the deleted branch or tag Ref string `json:"ref"` // branch or tag RefType string `json:"ref-type,omitempty"` // the repository, / Repository string `json:"repository"` // who deleted it Sender string `json:"sender,omitempty"` } // RepoWritableEvent is the body of the event repo-writable. type RepoWritableEvent struct { // the account that writes it now Account string `json:"account"` // the repository, / Repository string `json:"repository"` } // BranchMovedEvent is the body of the event branch-moved. type BranchMovedEvent struct { At *time.Time `json:"at,omitempty"` Branch string `json:"branch"` // the head the webhook said, a commit's full 40-hex sha; read again by branch Head string `json:"head,omitempty"` // the repository, / Repository string `json:"repository"` } // MergeCalledEvent is the body of the event merge-called. type MergeCalledEvent = MergeCalled // FailedStepsByModuleFingerprintStepValue is one value of the state failed-steps under the key ... type FailedStepsByModuleFingerprintStepValue = FailedStep // CallsByCallCallValue is one value of the state calls under the key call.. type CallsByCallCallValue = Call