Monorepo for Tangled
0

Configure Feed

Select the types of activity you want to include in your feed.

tangled-core / api / tangled / repomergeCheck.go
2.1 kB 59 lines
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 // repo: DID of the repository 36 Repo *string `json:"repo,omitempty" cborgen:"repo,omitempty"` 37} 38 39// RepoMergeCheck_Output is the output of a sh.tangled.repo.mergeCheck call. 40type RepoMergeCheck_Output struct { 41 // conflicts: List of files with merge conflicts 42 Conflicts []*RepoMergeCheck_ConflictInfo `json:"conflicts,omitempty" cborgen:"conflicts,omitempty"` 43 // error: Error message if check failed 44 Error *string `json:"error,omitempty" cborgen:"error,omitempty"` 45 // is_conflicted: Whether the merge has conflicts 46 Is_conflicted bool `json:"is_conflicted" cborgen:"is_conflicted"` 47 // message: Additional message about the merge check 48 Message *string `json:"message,omitempty" cborgen:"message,omitempty"` 49} 50 51// RepoMergeCheck calls the XRPC method "sh.tangled.repo.mergeCheck". 52func RepoMergeCheck(ctx context.Context, c util.LexClient, input *RepoMergeCheck_Input) (*RepoMergeCheck_Output, error) { 53 var out RepoMergeCheck_Output 54 if err := c.LexDo(ctx, util.Procedure, "application/json", "sh.tangled.repo.mergeCheck", nil, input, &out); err != nil { 55 return nil, err 56 } 57 58 return &out, nil 59}