taglink

package
v0.3.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 5, 2026 License: MIT Imports: 10 Imported by: 0

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

Constants

This section is empty.

Variables

View Source
var Concurrency = 12

Concurrency is the number of repositories fetched in parallel.

View Source
var Transport = func(req *http.Request) (*http.Response, error) { return client.Do(req) }

Transport rewires requests in tests.

Functions

func Annotate

func Annotate(diffs []diffx.FileDiff)

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

func Candidates(c *diffx.Change, ver string) []string

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

func NormalizeRepoURL(raw string) string

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 Tags

func Tags(repo string) (map[string]bool, error)

Tags fetches the tag names of a repository via git's smart-HTTP ref advertisement: a single anonymous GET understood by every major forge.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL