···11+// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT.
22+33+package tangled
44+55+// schema: sh.tangled.git.defs
66+77+const ()
88+99+// GitDefs_Signature is a "signature" in the sh.tangled.git.defs schema.
1010+type GitDefs_Signature struct {
1111+ // email: Person email
1212+ Email string `json:"email" cborgen:"email"`
1313+ // name: Person name
1414+ Name string `json:"name" cborgen:"name"`
1515+ // when: Timestamp of the signature
1616+ When string `json:"when" cborgen:"when"`
1717+}
+59
api/tangled/gitmergeCheck.go
···11+// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT.
22+33+package tangled
44+55+// schema: sh.tangled.git.mergeCheck
66+77+import (
88+ "context"
99+1010+ "github.com/bluesky-social/indigo/lex/util"
1111+)
1212+1313+const (
1414+ GitMergeCheckNSID = "sh.tangled.git.mergeCheck"
1515+)
1616+1717+// GitMergeCheck_ConflictInfo is a "conflictInfo" in the sh.tangled.git.mergeCheck schema.
1818+type GitMergeCheck_ConflictInfo struct {
1919+ // filename: Name of the conflicted file
2020+ Filename string `json:"filename" cborgen:"filename"`
2121+ // reason: Reason for the conflict
2222+ Reason string `json:"reason" cborgen:"reason"`
2323+}
2424+2525+// GitMergeCheck_Input is the input argument to a sh.tangled.git.mergeCheck call.
2626+type GitMergeCheck_Input struct {
2727+ // branch: Target branch to merge into
2828+ Branch string `json:"branch" cborgen:"branch"`
2929+ // repo: DID of Git repository
3030+ Repo string `json:"repo" cborgen:"repo"`
3131+ Source *GitMergeCheck_Input_Source `json:"source" cborgen:"source"`
3232+}
3333+3434+type GitMergeCheck_Input_Source struct {
3535+ // commit: Head commit ID of PR to merge
3636+ Commit string `json:"commit" cborgen:"commit"`
3737+ // repo: DID of source git repository
3838+ Repo string `json:"repo" cborgen:"repo"`
3939+}
4040+4141+// GitMergeCheck_Output is the output of a sh.tangled.git.mergeCheck call.
4242+type GitMergeCheck_Output struct {
4343+ // conflicts: List of files with merge conflicts
4444+ Conflicts []*GitMergeCheck_ConflictInfo `json:"conflicts,omitempty" cborgen:"conflicts,omitempty"`
4545+ // isConflicted: Whether the merge has conflicts
4646+ IsConflicted bool `json:"isConflicted" cborgen:"isConflicted"`
4747+ // message: Additional message about the merge check
4848+ Message *string `json:"message,omitempty" cborgen:"message,omitempty"`
4949+}
5050+5151+// GitMergeCheck calls the XRPC method "sh.tangled.git.mergeCheck".
5252+func GitMergeCheck(ctx context.Context, c util.LexClient, input *GitMergeCheck_Input) (*GitMergeCheck_Output, error) {
5353+ var out GitMergeCheck_Output
5454+ if err := c.LexDo(ctx, util.Procedure, "application/json", "sh.tangled.git.mergeCheck", nil, input, &out); err != nil {
5555+ return nil, err
5656+ }
5757+5858+ return &out, nil
5959+}
+49
api/tangled/repomergePullRequest.go
···11+// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT.
22+33+package tangled
44+55+// schema: sh.tangled.repo.mergePullRequest
66+77+import (
88+ "context"
99+1010+ "github.com/bluesky-social/indigo/lex/util"
1111+)
1212+1313+const (
1414+ RepoMergePullRequestNSID = "sh.tangled.repo.mergePullRequest"
1515+)
1616+1717+// RepoMergePullRequest_Input is the input argument to a sh.tangled.repo.mergePullRequest call.
1818+type RepoMergePullRequest_Input struct {
1919+ // branch: Target branch to merge into
2020+ Branch string `json:"branch" cborgen:"branch"`
2121+ Commit *RepoMergePullRequest_Input_Commit `json:"commit,omitempty" cborgen:"commit,omitempty"`
2222+ // repo: DID of git repository
2323+ Repo string `json:"repo" cborgen:"repo"`
2424+ Source *RepoMergePullRequest_Input_Source `json:"source" cborgen:"source"`
2525+ Style string `json:"style" cborgen:"style"`
2626+}
2727+2828+type RepoMergePullRequest_Input_Commit struct {
2929+ // author: Merge commit author. Ignored when squash = false
3030+ Author *GitDefs_Signature `json:"author,omitempty" cborgen:"author,omitempty"`
3131+ // message: Merge commit message. Ignored when squash = false
3232+ Message *string `json:"message,omitempty" cborgen:"message,omitempty"`
3333+}
3434+3535+type RepoMergePullRequest_Input_Source struct {
3636+ // commit: Head commit ID of PR to merge
3737+ Commit string `json:"commit" cborgen:"commit"`
3838+ // repo: DID of source git repository
3939+ Repo string `json:"repo" cborgen:"repo"`
4040+}
4141+4242+// RepoMergePullRequest calls the XRPC method "sh.tangled.repo.mergePullRequest".
4343+func RepoMergePullRequest(ctx context.Context, c util.LexClient, input *RepoMergePullRequest_Input) error {
4444+ if err := c.LexDo(ctx, util.Procedure, "application/json", "sh.tangled.repo.mergePullRequest", nil, input, nil); err != nil {
4545+ return err
4646+ }
4747+4848+ return nil
4949+}