Documentation
¶
Overview ¶
Package github provides a client for querying the GitHub API, primarily to check repository metadata such as archive status.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseGitHubRemote ¶
ParseGitHubRemote extracts owner and repo from a GitHub remote URL. Supports both SSH (git@github.com:owner/repo.git) and HTTPS (https://github.com/owner/repo.git) formats.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client wraps GitHub API access.
func NewClient ¶
NewClient creates a GitHub client. It attempts to use authentication from the gh CLI config, falling back to the provided token, falling back to unauthenticated access.
func (*Client) BranchPRState ¶ added in v0.3.0
BranchPRState returns the PR state for a branch. It checks the most recent PR associated with the given head branch. Returns PRStateNone if no PR exists for the branch.
type PRState ¶ added in v0.3.0
type PRState string
PRState represents the state of a GitHub pull request for a branch.
const ( // PRStateNone means no PR was found for the branch. PRStateNone PRState = "none" // PRStateOpen means a PR is currently open. PRStateOpen PRState = "open" // PRStateMerged means the PR was merged. PRStateMerged PRState = "merged" // PRStateClosed means the PR was closed without merging. PRStateClosed PRState = "closed" )