Something went wrong. Try again.
Monorepo for Tangled forked from tangled.org/core
Something went wrong. Try again.
1.3 kB · 45 lines
Go
at master
12345678910111213141516171819202122232425262728293031323334353637383940414243444546// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT.
package org_tangled
// schema: org.tangled.git.getBranch
import ( "context"
"github.com/bluesky-social/indigo/lex/util")
const ( GitGetBranchNSID = "org.tangled.git.getBranch")
// GitGetBranch_Output is the output of a org.tangled.git.getBranch call.type GitGetBranch_Output struct { Author *GitDefs_Signature `json:"author" cborgen:"author"` // hash: Latest commit hash on this branch Hash string `json:"hash" cborgen:"hash"` // message: Latest commit message Message string `json:"message" cborgen:"message"` // name: Branch name Name string `json:"name" cborgen:"name"` // totalCommits: Number of commits reachable from this branch TotalCommits int64 `json:"totalCommits" cborgen:"totalCommits"`}
// GitGetBranch calls the XRPC method "org.tangled.git.getBranch".//// name: Branch name to get information for// repo: DID of the repositoryfunc GitGetBranch(ctx context.Context, c util.LexClient, name string, repo string) (*GitGetBranch_Output, error) { var out GitGetBranch_Output
params := map[string]interface{}{} params["name"] = name params["repo"] = repo if err := c.LexDo(ctx, util.Query, "", "org.tangled.git.getBranch", params, nil, &out); err != nil { return nil, err }
return &out, nil}