~james/core

core/api/org_tangled/reviewsubmitPatch.go -rw-r--r-- 1.7 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
// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT.

package org_tangled

// schema: org.tangled.review.submitPatch

import (
	"context"

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

const (
	ReviewSubmitPatchNSID = "org.tangled.review.submitPatch"
)

// ReviewSubmitPatch_Input is the input argument to a org.tangled.review.submitPatch call.
type ReviewSubmitPatch_Input struct {
	Patch *ReviewSubmitPatch_Patch `json:"patch" cborgen:"patch"`
	// repo: DID of the repository
	Repo string `json:"repo" cborgen:"repo"`
}

// ReviewSubmitPatch_Output is the output of a org.tangled.review.submitPatch call.
type ReviewSubmitPatch_Output struct {
	// cid: CID of created org.tangled.review.patch record.
	Cid string `json:"cid" cborgen:"cid"`
	// uri: AT-URI of created org.tangled.review.patch record.
	Uri string `json:"uri" cborgen:"uri"`
}

// ReviewSubmitPatch_Patch is a "patch" in the org.tangled.review.submitPatch schema.
type ReviewSubmitPatch_Patch struct {
	Base         *GitOid `json:"base" cborgen:"base"`
	Head         *GitOid `json:"head" cborgen:"head"`
	SourceBranch *string `json:"sourceBranch,omitempty" cborgen:"sourceBranch,omitempty"`
	// sourceRepo: DID of the repository to fetch `head` from.
	SourceRepo string `json:"sourceRepo" cborgen:"sourceRepo"`
	// ticket: ticket-id
	Ticket string `json:"ticket" cborgen:"ticket"`
}

// ReviewSubmitPatch calls the XRPC method "org.tangled.review.submitPatch".
func ReviewSubmitPatch(ctx context.Context, c util.LexClient, input *ReviewSubmitPatch_Input) (*ReviewSubmitPatch_Output, error) {
	var out ReviewSubmitPatch_Output
	if err := c.LexDo(ctx, util.Procedure, "application/json", "org.tangled.review.submitPatch", nil, input, &out); err != nil {
		return nil, err
	}

	return &out, nil
}