Documentation
¶
Index ¶
- type AuthStatus
- type Client
- func (c *Client) Clone(repoURL, dest string) error
- func (c *Client) CloneToTemp(repoURL string) (string, error)
- func (c *Client) GetAuthStatus() (*AuthStatus, error)
- func (c *Client) IsAvailable() bool
- func (c *Client) IsInstalled() bool
- func (c *Client) IssueClose(opts IssueCloseOptions) error
- func (c *Client) IssueComment(opts IssueCommentOptions) error
- func (c *Client) IssueCreate(opts IssueCreateOptions) (*Issue, error)
- func (c *Client) IssueList(opts IssueListOptions) ([]Issue, error)
- func (c *Client) IssueView(number int, repo string) (*Issue, error)
- func (c *Client) Login() error
- func (c *Client) ReleaseCreate(opts ReleaseCreateOptions) (*Release, error)
- func (c *Client) ReleaseList(opts ReleaseListOptions) ([]Release, error)
- func (c *Client) ReleaseView(tag string, repo string) (*Release, error)
- type Issue
- type IssueCloseOptions
- type IssueCommentOptions
- type IssueCreateOptions
- type IssueListOptions
- type Release
- type ReleaseCreateOptions
- type ReleaseListOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthStatus ¶
AuthStatus represents the authentication status from gh CLI
type Client ¶
type Client struct{}
Client wraps the gh CLI for GitHub operations
func (*Client) Clone ¶
Clone clones a GitHub repository to the specified destination. repoURL can be:
- Full URL: https://github.com/owner/repo
- Short form: owner/repo
If dest is empty, clones to the repo name in current directory.
func (*Client) CloneToTemp ¶
CloneToTemp clones a repository to a temporary directory and returns the path. The caller is responsible for cleaning up the directory.
func (*Client) GetAuthStatus ¶
func (c *Client) GetAuthStatus() (*AuthStatus, error)
GetAuthStatus returns the current authentication status
func (*Client) IsAvailable ¶
IsAvailable checks if the gh CLI is installed and authenticated
func (*Client) IsInstalled ¶
IsInstalled checks if the gh CLI is installed (regardless of auth status)
func (*Client) IssueClose ¶ added in v0.17.0
func (c *Client) IssueClose(opts IssueCloseOptions) error
IssueClose closes an issue
func (*Client) IssueComment ¶ added in v0.20.0
func (c *Client) IssueComment(opts IssueCommentOptions) error
IssueComment adds a comment to an issue
func (*Client) IssueCreate ¶ added in v0.17.0
func (c *Client) IssueCreate(opts IssueCreateOptions) (*Issue, error)
IssueCreate creates a new issue
func (*Client) IssueList ¶ added in v0.17.0
func (c *Client) IssueList(opts IssueListOptions) ([]Issue, error)
IssueList lists issues in a repository
func (*Client) ReleaseCreate ¶ added in v0.19.0
func (c *Client) ReleaseCreate(opts ReleaseCreateOptions) (*Release, error)
ReleaseCreate creates a new release
func (*Client) ReleaseList ¶ added in v0.19.0
func (c *Client) ReleaseList(opts ReleaseListOptions) ([]Release, error)
ReleaseList lists releases in a repository
type Issue ¶ added in v0.17.0
type Issue struct {
Number int `json:"number"`
Title string `json:"title"`
State string `json:"state"`
Author string `json:"author"`
Labels []string `json:"labels"`
Assignees []string `json:"assignees"`
CreatedAt string `json:"createdAt"`
URL string `json:"url"`
Body string `json:"body"`
}
Issue represents a GitHub issue
type IssueCloseOptions ¶ added in v0.17.0
type IssueCloseOptions struct {
Number int
Comment string
Reason string // "completed" or "not planned"
Repo string
}
IssueCloseOptions contains options for closing an issue
type IssueCommentOptions ¶ added in v0.20.0
IssueCommentOptions contains options for commenting on an issue
type IssueCreateOptions ¶ added in v0.17.0
type IssueCreateOptions struct {
Title string
Body string
Labels []string
Assignee string
Repo string
}
IssueCreateOptions contains options for creating an issue
type IssueListOptions ¶ added in v0.17.0
type IssueListOptions struct {
State string // open, closed, all
Label string
Assignee string
Limit int
Repo string // optional: owner/repo
}
IssueListOptions contains options for listing issues
type Release ¶ added in v0.19.0
type Release struct {
TagName string `json:"tagName"`
Name string `json:"name"`
Body string `json:"body"`
IsDraft bool `json:"isDraft"`
IsPrerelease bool `json:"isPrerelease"`
IsLatest bool `json:"isLatest"`
CreatedAt string `json:"createdAt"`
PublishedAt string `json:"publishedAt"`
Author string `json:"author"`
URL string `json:"url"`
}
Release represents a GitHub release
type ReleaseCreateOptions ¶ added in v0.19.0
type ReleaseCreateOptions struct {
Tag string
Title string
Notes string
NotesFile string
GenerateNotes bool
Draft bool
Prerelease bool
Latest *bool // nil = auto, true = mark as latest, false = don't mark
Target string
Repo string
}
ReleaseCreateOptions contains options for creating a release