Documentation
¶
Overview ¶
Package github provides GitHub CLI (gh) wrapper functions.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckGHAvailable ¶
func CheckGHAvailable() error
CheckGHAvailable verifies the gh CLI is installed and authenticated.
func UpdateReleaseBody ¶
UpdateReleaseBody updates the release notes for a given tag.
Types ¶
type Release ¶
type Release struct {
TagName string `json:"tagName"`
PublishedAt time.Time `json:"publishedAt"`
IsDraft bool `json:"isDraft"`
IsPrerelease bool `json:"isPrerelease"`
}
Release represents a GitHub release.
func FindPreviousRelease ¶
func FindPreviousRelease(releases []Release, tag string, tagValidator func(string) bool) (*Release, error)
FindPreviousRelease finds the release published immediately before the given tag. The tagValidator function is used to filter releases to only those with valid git tags. Returns nil (without error) if no valid previous release is found.
func GetLatestRelease ¶
GetLatestRelease returns the most recently published release.
func ListReleases ¶
ListReleases returns all releases for the current repository.
type RepoInfo ¶
RepoInfo holds the repository metadata from gh repo view.
func GetRepoInfo ¶
GetRepoInfo returns the repository name and owner/name in a single gh call.