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.listCommits
6
7import (
8 "bytes"
9 "context"
10
11 "github.com/bluesky-social/indigo/lex/util"
12)
13
14const (
15 GitTempListCommitsNSID = "sh.tangled.git.temp.listCommits"
16)
17
18// GitTempListCommits calls the XRPC method "sh.tangled.git.temp.listCommits".
19//
20// cursor: Pagination cursor (commit SHA)
21// limit: Maximum number of commits to return
22// ref: Git reference (branch, tag, or commit SHA)
23// repo: AT-URI of the repository
24func GitTempListCommits(ctx context.Context, c util.LexClient, cursor string, limit int64, ref string, repo string) ([]byte, error) {
25 buf := new(bytes.Buffer)
26
27 params := map[string]interface{}{}
28 if cursor != "" {
29 params["cursor"] = cursor
30 }
31 if limit != 0 {
32 params["limit"] = limit
33 }
34 if ref != "" {
35 params["ref"] = ref
36 }
37 params["repo"] = repo
38 if err := c.LexDo(ctx, util.Query, "", "sh.tangled.git.temp.listCommits", params, nil, buf); err != nil {
39 return nil, err
40 }
41
42 return buf.Bytes(), nil
43}