Documentation
¶
Overview ¶
Package github provides utilities for working with GitHub URLs and the GitHub API.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsGitHubURL ¶
IsGitHubURL checks if a URL is any kind of GitHub URL we can handle.
Types ¶
type Fetcher ¶
type Fetcher struct {
// contains filtered or unexported fields
}
Fetcher handles downloading files and directories from GitHub.
func (*Fetcher) FetchDirectory ¶
FetchDirectory downloads all files from a GitHub directory and returns them as a zip.
type TreeURL ¶
type TreeURL struct {
Owner string // Repository owner (e.g., "metabase")
Repo string // Repository name (e.g., "metabase")
Ref string // Branch, tag, or commit (e.g., "master")
Path string // Path within the repository (e.g., ".claude/skills/docs-write")
}
TreeURL represents a parsed GitHub tree URL pointing to a directory. Example: https://github.com/metabase/metabase/tree/master/.claude/skills/docs-write
func ParseTreeURL ¶
ParseTreeURL parses a GitHub tree URL into its components. Returns nil if the URL is not a valid GitHub tree URL.
func (*TreeURL) ContentsAPIURL ¶
ContentsAPIURL returns the GitHub API URL for listing directory contents. Example: https://api.github.com/repos/metabase/metabase/contents/.claude/skills/docs-write?ref=master
func (*TreeURL) RawURL ¶
RawURL returns the raw.githubusercontent.com URL for a file within this tree. Example: https://raw.githubusercontent.com/metabase/metabase/master/.claude/skills/docs-write/SKILL.md