// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT.

package tangled

// schema: sh.tangled.git.temp.getCommit

import (
	"context"

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

const (
	GitTempGetCommitNSID = "sh.tangled.git.temp.getCommit"
)

// GitTempGetCommit calls the XRPC method "sh.tangled.git.temp.getCommit".
//
// ref: reference name to resolve
// repo: AT-URI of the repository
func GitTempGetCommit(ctx context.Context, c util.LexClient, ref string, repo string) (*GitTempDefs_Commit, error) {
	var out GitTempDefs_Commit

	params := map[string]interface{}{}
	params["ref"] = ref
	params["repo"] = repo
	if err := c.LexDo(ctx, util.Query, "", "sh.tangled.git.temp.getCommit", params, nil, &out); err != nil {
		return nil, err
	}

	return &out, nil
}
