forked from
tangled.org/core
this repo 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.temp.getBranch
6
7import (
8 "context"
9
10 "github.com/bluesky-social/indigo/lex/util"
11)
12
13const (
14 GitTempGetBranchNSID = "sh.tangled.git.temp.getBranch"
15)
16
17// GitTempGetBranch_Output is the output of a sh.tangled.git.temp.getBranch call.
18type GitTempGetBranch_Output struct {
19 Author *GitTempDefs_Signature `json:"author,omitempty" cborgen:"author,omitempty"`
20 // hash: Latest commit hash on this branch
21 Hash string `json:"hash" cborgen:"hash"`
22 // message: Latest commit message
23 Message *string `json:"message,omitempty" cborgen:"message,omitempty"`
24 // name: Branch name
25 Name string `json:"name" cborgen:"name"`
26 // when: Timestamp of latest commit
27 When string `json:"when" cborgen:"when"`
28}
29
30// GitTempGetBranch calls the XRPC method "sh.tangled.git.temp.getBranch".
31//
32// name: Branch name to get information for
33// repo: AT-URI of the repository
34func GitTempGetBranch(ctx context.Context, c util.LexClient, name string, repo string) (*GitTempGetBranch_Output, error) {
35 var out GitTempGetBranch_Output
36
37 params := map[string]interface{}{}
38 params["name"] = name
39 params["repo"] = repo
40 if err := c.LexDo(ctx, util.Query, "", "sh.tangled.git.temp.getBranch", params, nil, &out); err != nil {
41 return nil, err
42 }
43
44 return &out, nil
45}