This repository has no description
1// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT.
2
3package tangled
4
5// schema: sh.tangled.git.mergeCheck
6
7import (
8 "context"
9
10 "github.com/bluesky-social/indigo/lex/util"
11)
12
13const (
14 GitMergeCheckNSID = "sh.tangled.git.mergeCheck"
15)
16
17// GitMergeCheck_ConflictInfo is a "conflictInfo" in the sh.tangled.git.mergeCheck schema.
18type GitMergeCheck_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// GitMergeCheck_Input is the input argument to a sh.tangled.git.mergeCheck call.
26type GitMergeCheck_Input struct {
27 // branch: Target branch to merge into
28 Branch string `json:"branch" cborgen:"branch"`
29 // repo: DID of Git repository
30 Repo string `json:"repo" cborgen:"repo"`
31 Source *GitMergeCheck_Input_Source `json:"source" cborgen:"source"`
32}
33
34type GitMergeCheck_Input_Source struct {
35 // commit: Head commit ID of PR to merge
36 Commit string `json:"commit" cborgen:"commit"`
37 // repo: DID of source git repository
38 Repo string `json:"repo" cborgen:"repo"`
39}
40
41// GitMergeCheck_Output is the output of a sh.tangled.git.mergeCheck call.
42type GitMergeCheck_Output struct {
43 // conflicts: List of files with merge conflicts
44 Conflicts []*GitMergeCheck_ConflictInfo `json:"conflicts,omitempty" cborgen:"conflicts,omitempty"`
45 // isConflicted: Whether the merge has conflicts
46 IsConflicted bool `json:"isConflicted" cborgen:"isConflicted"`
47 // message: Additional message about the merge check
48 Message *string `json:"message,omitempty" cborgen:"message,omitempty"`
49}
50
51// GitMergeCheck calls the XRPC method "sh.tangled.git.mergeCheck".
52func GitMergeCheck(ctx context.Context, c util.LexClient, input *GitMergeCheck_Input) (*GitMergeCheck_Output, error) {
53 var out GitMergeCheck_Output
54 if err := c.LexDo(ctx, util.Procedure, "application/json", "sh.tangled.git.mergeCheck", nil, input, &out); err != nil {
55 return nil, err
56 }
57
58 return &out, nil
59}