Documentation
¶
Overview ¶
Package git inspects the current repository and parses git remote metadata.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseRemoteURL ¶
ParseRemoteURL parses a git remote URL into host, owner, and repository name.
Types ¶
type RepoContext ¶
type RepoContext struct {
// Root is the repository root directory.
Root string
// RemoteName is the git remote name that was inspected.
RemoteName string
// RemoteURL is the git remote URL.
RemoteURL string
// RepoOwner is the remote repository owner or namespace.
RepoOwner string
// RepoName is the remote repository name.
RepoName string
// RepoSlug is the owner and repository name joined as owner/repo.
RepoSlug string
// RemoteHost is the remote repository host.
RemoteHost string
// CurrentBranch is the currently checked out branch name.
CurrentBranch string
}
RepoContext describes the current git repository and selected remote.
func Inspect ¶
func Inspect(remote string) (*RepoContext, error)
Inspect gathers repository details for the current working tree and remote.
Click to show internal directories.
Click to hide internal directories.