~james/core

core/api/org_tangled/tempgitmergeCommit.go -rw-r--r-- 2.2 KiB
452f17b7 — james chore(import): snapshot james.dad.town/core at f70c71c7696a 16 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 org_tangled

// schema: org.tangled.temp.git.mergeCommit

import (
	"context"

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

const (
	TempGitMergeCommitNSID = "org.tangled.temp.git.mergeCommit"
)

// TempGitMergeCommit_Input is the input argument to a org.tangled.temp.git.mergeCommit call.
type TempGitMergeCommit_Input struct {
	// mergeCommit: Merge commit content. Used when merge commit is created.
	MergeCommit *TempGitMergeCommit_MergeCommitContent `json:"mergeCommit,omitempty" cborgen:"mergeCommit,omitempty"`
	Source      *TempGitMergeCommit_Source             `json:"source" cborgen:"source"`
	Style       string                                 `json:"style" cborgen:"style"`
	Target      *TempGitMergeCommit_Target             `json:"target" cborgen:"target"`
}

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

// TempGitMergeCommit_Source is a "source" in the org.tangled.temp.git.mergeCommit schema.
type TempGitMergeCommit_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"`
}

// TempGitMergeCommit_Target is a "target" in the org.tangled.temp.git.mergeCommit schema.
type TempGitMergeCommit_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"`
}

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

	return nil
}