github

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ResolveToken

func ResolveToken(useAuth bool) string

ResolveToken determines the GitHub token to use for API requests. If useAuth is false, returns an empty string. Otherwise it checks the GITHUB_TOKEN environment variable and falls back to the gh CLI.

Types

type Client

type Client interface {
	GetLatestRelease(owner, repo string) (string, error)
}

Client is an interface for retrieving the latest release version from GitHub.

type DefaultClient

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

DefaultClient implements Client using the GitHub REST API.

func NewDefaultClient

func NewDefaultClient(token string) *DefaultClient

NewDefaultClient creates a new DefaultClient with an optional auth token.

func (*DefaultClient) GetLatestRelease

func (c *DefaultClient) GetLatestRelease(owner, repo string) (string, error)

GetLatestRelease fetches the latest release tag name for the given owner/repo.

Jump to

Keyboard shortcuts

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