Documentation
¶
Overview ¶
Package taglink turns version bumps into verified upstream links: it fetches each source repository's tag list over git's smart-HTTP protocol (one anonymous GET per repo, no API tokens, no rate limits) and, when the old and new versions match real tags, builds compare / release-notes URLs that are guaranteed not to 404.
Index ¶
- Variables
- func Annotate(diffs []diffx.FileDiff)
- func Candidates(c *diffx.Change, ver string) []string
- func NormalizeRepoURL(raw string) string
- func Refs(repo string) (tags, heads map[string]string, err error)
- func TagSHAs(repo string) (map[string]string, error)
- func Tags(repo string) (map[string]bool, error)
Constants ¶
This section is empty.
Variables ¶
var Concurrency = 12
Concurrency is the number of repositories fetched in parallel.
var Transport = func(req *http.Request) (*http.Response, error) { return client.Do(req) }
Transport rewires requests in tests.
Functions ¶
func Annotate ¶
Annotate fills CompareURL / ReleaseURL on changes whose SourceRepo is on a known forge, verifying tag names against the repository's real tag list. Best-effort and silent: unreachable repos or unmatched tags simply leave the fields empty.
func Candidates ¶ added in v0.3.4
Candidates lists tag names that could mark this version of a package, most likely first (exported for relnotes' no-taglink fallback, which resolves versions against a repository's release list instead of its tag advertisement).
func NormalizeRepoURL ¶
NormalizeRepoURL canonicalises the many shapes registries use for a source-repo reference ("git+https://….git", "git@github.com:o/r.git", "git://…", trailing /tree/… paths) into a plain https URL, or "" when it can't be made canonical.
func Refs ¶ added in v0.5.0
Refs fetches tag name -> commit SHA and branch name -> head SHA from one smart-HTTP ref advertisement. Annotated tags collapse onto their peeled (^{}) commit.
Types ¶
This section is empty.