Documentation
¶
Index ¶
- Variables
- type GitHubCli
- func (gh *GitHubCli) CheckAndGetInstallError() error
- func (gh *GitHubCli) CreateRelease(cwd string, tagName string, opts map[string]string, assets []string) (*Release, error)
- func (gh *GitHubCli) GetInstallInstructions() string
- func (gh *GitHubCli) IsAuthenticated() (bool, error)
- func (gh *GitHubCli) IsInstalled() (bool, error)
- func (gh *GitHubCli) ViewRelease(cwd string, repo string, tagName string) (*Release, error)
- func (gh *GitHubCli) ViewRepository(cwd string, repo string) (*Repository, error)
- type Release
- type ReleaseAsset
- type Repository
Constants ¶
This section is empty.
Variables ¶
var ( ErrReleaseAlreadyExists = fmt.Errorf("release already exists") ErrReleaseNotFound = fmt.Errorf("release not found") )
Functions ¶
This section is empty.
Types ¶
type GitHubCli ¶
type GitHubCli struct {
// ExecutablePath is the path to the GitHub CLI executable
ExecutablePath string
// DefaultRepo is the default repository to use if none is specified
DefaultRepo string
}
GitHubCli provides access to GitHub CLI functionality
func NewGitHubCli ¶
NewGitHubCli creates a new GitHub CLI wrapper
func (*GitHubCli) CheckAndGetInstallError ¶
CheckAndGetInstallError checks if GitHub CLI is installed and returns a UserFriendlyError if it's not
func (*GitHubCli) CreateRelease ¶
func (gh *GitHubCli) CreateRelease(cwd string, tagName string, opts map[string]string, assets []string) (*Release, error)
CreateRelease creates a new GitHub release
func (*GitHubCli) GetInstallInstructions ¶
GetInstallInstructions returns OS-specific instructions for installing GitHub CLI (legacy method)
func (*GitHubCli) IsAuthenticated ¶
IsAuthenticated checks if the user is authenticated with GitHub
func (*GitHubCli) IsInstalled ¶
IsInstalled checks if the GitHub CLI is installed and available
func (*GitHubCli) ViewRelease ¶
ViewRelease gets information about a GitHub release
func (*GitHubCli) ViewRepository ¶
func (gh *GitHubCli) ViewRepository(cwd string, repo string) (*Repository, error)
ViewRepository gets information about a GitHub repository
type Release ¶
type Release struct {
Name string `json:"name"`
TagName string `json:"tagName"`
Url string `json:"url"`
Assets []*ReleaseAsset `json:"assets"`
}
Release represents a GitHub release
type ReleaseAsset ¶
type ReleaseAsset struct {
Id string `json:"id"`
ContentType string `json:"contentType"`
Name string `json:"name"`
Size int64 `json:"size"`
State string `json:"state"`
Url string `json:"url"`
Path string `json:"path"` // Local path when downloaded
}
ReleaseAsset represents an asset attached to a GitHub release
type Repository ¶
Repository represents a GitHub repository