github

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 25, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(opts ...Option) *Client

func (*Client) HasToken added in v0.2.0

func (c *Client) HasToken() bool

HasToken reports whether the client was configured with a GitHub token.

func (*Client) RateLimitHit added in v0.2.0

func (c *Client) RateLimitHit() bool

RateLimitHit reports whether any API call encountered a rate limit error.

func (*Client) ResolveTagSHA

func (c *Client) ResolveTagSHA(ctx context.Context, owner, repo, tag string) (string, error)

ResolveTagSHA resolves a git tag to its underlying commit SHA. For annotated tags, it dereferences the tag object to find the commit. Results are cached to avoid duplicate API calls for the same owner/repo@tag.

func (*Client) VerifyCommit added in v0.1.0

func (c *Client) VerifyCommit(ctx context.Context, owner, repo, sha string) (bool, error)

VerifyCommit checks whether a commit SHA is reachable from any branch or tag in the given repository. Results are cached.

type Option

type Option func(*Client)

func WithBaseURL

func WithBaseURL(url string) Option

func WithHTTPClient

func WithHTTPClient(hc *http.Client) Option

func WithToken

func WithToken(token string) Option

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL