~james/core

core/api/tangled/gitmergeCommit.go -rw-r--r-- 2.1 KiB
452f17b7 — james chore(import): snapshot james.dad.town/core at f70c71c7696a 15 hours ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT.

package tangled

// schema: sh.tangled.git.mergeCommit

import (
	"context"

	"github.com/bluesky-social/indigo/lex/util"
)

const (
	GitMergeCommitNSID = "sh.tangled.git.mergeCommit"
)

// GitMergeCommit_Input is the input argument to a sh.tangled.git.mergeCommit call.
type GitMergeCommit_Input struct {
	// mergeCommit: Merge commit content. Used when merge commit is created.
	MergeCommit *GitMergeCommit_MergeCommitContent `json:"mergeCommit,omitempty" cborgen:"mergeCommit,omitempty"`
	Source      *GitMergeCommit_Source             `json:"source" cborgen:"source"`
	Style       string                             `json:"style" cborgen:"style"`
	Target      *GitMergeCommit_Target             `json:"target" cborgen:"target"`
}

// GitMergeCommit_MergeCommitContent is a "mergeCommitContent" in the sh.tangled.git.mergeCommit schema.
//
// Merge commit content. Used when merge commit is created.
type GitMergeCommit_MergeCommitContent struct {
	Author  *GitDefs_Signature `json:"author,omitempty" cborgen:"author,omitempty"`
	Message *string            `json:"message,omitempty" cborgen:"message,omitempty"`
}

// GitMergeCommit_Source is a "source" in the sh.tangled.git.mergeCommit schema.
type GitMergeCommit_Source struct {
	// commit: Head commit ID to merge
	Commit string `json:"commit" cborgen:"commit"`
	// repo: DID of source git repository
	Repo string `json:"repo" cborgen:"repo"`
}

// GitMergeCommit_Target is a "target" in the sh.tangled.git.mergeCommit schema.
type GitMergeCommit_Target struct {
	// branch: Target branch to merge into
	Branch string `json:"branch" cborgen:"branch"`
	// commit: Head commit ID of target branch
	Commit string `json:"commit" cborgen:"commit"`
	// repo: DID of target git repository
	Repo string `json:"repo" cborgen:"repo"`
}

// GitMergeCommit calls the XRPC method "sh.tangled.git.mergeCommit".
func GitMergeCommit(ctx context.Context, c util.LexClient, input *GitMergeCommit_Input) error {
	if err := c.LexDo(ctx, util.Procedure, "application/json", "sh.tangled.git.mergeCommit", nil, input, nil); err != nil {
		return err
	}

	return nil
}