Skip to content

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.

How GTB uses it

Three GTB surfaces consume the module; none changed behaviour in the move:

  • The embedded changelog command (pkg/cmd/changelog) parses and displays release notes at runtime. See the CLI reference.
  • The cmd/changelog generator tool wraps GenerateFromRepo as a Go tool directive, used in CI to write CHANGELOG.md:
go tool changelog generate --output assets/CHANGELOG.md --since v1.5.0
tool gitlab.com/phpboyscout/go-tool-base/cmd/changelog
  • Self-update (pkg/setup): SelfUpdater.GetStructuredReleaseNotes fetches release notes — preferring a CHANGELOG.md bundled in the release archive via ParseFromArchive, falling back to per-release API calls — and renders breaking changes prominently with FormatSummary.
cl, err := updater.GetStructuredReleaseNotes(ctx, "v1.0.0", "v1.3.0", archive)
if err == nil && cl.HasBreakingChanges() {
    fmt.Print(changelog.FormatSummary(cl))
}
  • Setup / Update — the self-update lifecycle that consumes the parser.
  • Version — version comparison utilities used alongside changelog diffing.