Changelog¶
Conventional-Commits changelog generation (GenerateFromRepo, via go-git) and
parsing (Parse, ParseFromArchive, FormatSummary, and the Changelog / Release
/ Entry / Category model) now live in the standalone module
gitlab.com/phpboyscout/go/changelog.
It is framework-free — its graph is go-git, the leodido conventional-commits parser,
x/mod, and cockroachdb/errors.
- Docs: changelog.go.phpboyscout.uk
- API reference: pkg.go.dev
- Migration: changelog generation/parsing →
go/changelog
How GTB uses it¶
Three GTB surfaces consume the module; none changed behaviour in the move:
- The embedded
changelogcommand (pkg/cmd/changelog) parses and displays release notes at runtime. See the CLI reference. - The
cmd/changeloggenerator tool wrapsGenerateFromRepoas a Go tool directive, used in CI to writeCHANGELOG.md:
- Self-update (
pkg/setup):SelfUpdater.GetStructuredReleaseNotesfetches release notes — preferring aCHANGELOG.mdbundled in the release archive viaParseFromArchive, falling back to per-release API calls — and renders breaking changes prominently withFormatSummary.
cl, err := updater.GetStructuredReleaseNotes(ctx, "v1.0.0", "v1.3.0", archive)
if err == nil && cl.HasBreakingChanges() {
fmt.Print(changelog.FormatSummary(cl))
}
Related¶
- Setup / Update — the self-update lifecycle that consumes the parser.
- Version — version comparison utilities used alongside changelog diffing.