Documentation ¶
Overview ¶
Package repository is a set of types and functions for modeling and interacting with GitHub repositories.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Repository ¶
Repository holds information representing a GitHub repository.
func Current ¶
func Current() (Repository, error)
Current uses git remotes to determine the GitHub repository the current directory is tracking.
func Parse ¶
func Parse(s string) (Repository, error)
Parse extracts the repository information from the following string formats: "OWNER/REPO", "HOST/OWNER/REPO", and a full URL. If the format does not specify a host, use the config to determine a host.
func ParseWithHost ¶
func ParseWithHost(s, host string) (Repository, error)
Parse extracts the repository information from the following string formats: "OWNER/REPO", "HOST/OWNER/REPO", and a full URL. If the format does not specify a host, use the host provided.