gitcliff

package
v0.27.0 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2026 License: MIT Imports: 8 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MergeTOML

func MergeTOML(base, override string) (string, error)

MergeTOML deep-merges override into base. Maps are merged recursively; all other types (scalars, arrays) replace the base value. If override is empty, base is returned verbatim.

Types

type Generator

type Generator struct {
	// contains filtered or unexported fields
}

Generator implements port.Generator for git-cliff.

func New

func New(runner port.Runner, cfg *config.ContentDriver, mode Mode) *Generator

New constructs a Generator for git-cliff.

func (*Generator) Check

func (g *Generator) Check() error

Check verifies that git-cliff is available on PATH.

func (*Generator) CheckCliff added in v0.6.0

func (g *Generator) CheckCliff() error

CheckCliff runs git-cliff --context --no-exec against the effective merged config. Called by `heraut check cliff`.

func (*Generator) Degraded added in v0.26.0

func (g *Generator) Degraded() bool

Degraded reports whether the most recent Generate/CheckCliff fell back to --offline because the remote metadata fetch failed under the "optional" policy (T78). Callers (pipeline / check) use it to warn that PR author / number were omitted.

func (*Generator) EffectiveChangelogConfig

func (g *Generator) EffectiveChangelogConfig() (string, error)

EffectiveChangelogConfig returns the merged TOML for the changelog variant.

func (*Generator) EffectiveReleaseNotesConfig

func (g *Generator) EffectiveReleaseNotesConfig() (string, error)

EffectiveReleaseNotesConfig returns the merged TOML for the release-notes variant.

func (*Generator) Generate

func (g *Generator) Generate(tag string, lc *port.LinkContext) (string, error)

Generate invokes git-cliff with the merged TOML config and returns stdout (release-notes mode) or empty string (changelog mode, where output goes to a file).

When lc is non-nil, heraut-owned env vars (HERAUT_REMOTE_URL, HERAUT_PLATFORM) are injected into the git-cliff process so the template resolves links against that platform; when nil, git-cliff runs with the ambient environment and the template falls through to its CI-var detection (ADR-0021 / T68).

func (*Generator) Validate

func (g *Generator) Validate() error

Validate checks that the user-specified config file exists (if any).

type Mode

type Mode int

Mode selects which embedded TOML default to use.

const (
	ModeChangelog    Mode = iota
	ModeReleaseNotes Mode = iota
)

Jump to

Keyboard shortcuts

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