Documentation
¶
Overview ¶
Package gitremote finds the web address of a folder's git repository, so clients can link commits, issues and files in a reply.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Lookup ¶
Lookup returns the web address of dir's "origin" remote (with insteadOf rewrites applied), its current branch and the repository's root folder. Any failure (not a repo, no origin, unknown host, git too slow) is ok=false. Results are cached per folder for a minute; expired entries are dropped whenever a new one is written.
func WebURL ¶
WebURL turns a git remote into the address of its web page, without ".git" and without credentials. An http(s) remote keeps its scheme and a non-default port (a server's web UI is where its git is); ssh, git and scp-like remotes become https on the bare host. Hosts other than GitHub and GitLab give false.
Types ¶
This section is empty.