forked from tangled.org/core
this repo has no description
at master 2.0 kB view raw
1// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 3package tangled 4 5// schema: sh.tangled.repo.mergeCheck 6 7import ( 8 "context" 9 10 "github.com/bluesky-social/indigo/lex/util" 11) 12 13const ( 14 RepoMergeCheckNSID = "sh.tangled.repo.mergeCheck" 15) 16 17// RepoMergeCheck_ConflictInfo is a "conflictInfo" in the sh.tangled.repo.mergeCheck schema. 18type RepoMergeCheck_ConflictInfo struct { 19 // filename: Name of the conflicted file 20 Filename string `json:"filename" cborgen:"filename"` 21 // reason: Reason for the conflict 22 Reason string `json:"reason" cborgen:"reason"` 23} 24 25// RepoMergeCheck_Input is the input argument to a sh.tangled.repo.mergeCheck call. 26type RepoMergeCheck_Input struct { 27 // branch: Target branch to merge into 28 Branch string `json:"branch" cborgen:"branch"` 29 // did: DID of the repository owner 30 Did string `json:"did" cborgen:"did"` 31 // name: Name of the repository 32 Name string `json:"name" cborgen:"name"` 33 // patch: Patch or pull request to check for merge conflicts 34 Patch string `json:"patch" cborgen:"patch"` 35} 36 37// RepoMergeCheck_Output is the output of a sh.tangled.repo.mergeCheck call. 38type RepoMergeCheck_Output struct { 39 // conflicts: List of files with merge conflicts 40 Conflicts []*RepoMergeCheck_ConflictInfo `json:"conflicts,omitempty" cborgen:"conflicts,omitempty"` 41 // error: Error message if check failed 42 Error *string `json:"error,omitempty" cborgen:"error,omitempty"` 43 // is_conflicted: Whether the merge has conflicts 44 Is_conflicted bool `json:"is_conflicted" cborgen:"is_conflicted"` 45 // message: Additional message about the merge check 46 Message *string `json:"message,omitempty" cborgen:"message,omitempty"` 47} 48 49// RepoMergeCheck calls the XRPC method "sh.tangled.repo.mergeCheck". 50func RepoMergeCheck(ctx context.Context, c util.LexClient, input *RepoMergeCheck_Input) (*RepoMergeCheck_Output, error) { 51 var out RepoMergeCheck_Output 52 if err := c.LexDo(ctx, util.Procedure, "application/json", "sh.tangled.repo.mergeCheck", nil, input, &out); err != nil { 53 return nil, err 54 } 55 56 return &out, nil 57}