native

package
v0.47.0 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2026 License: MIT Imports: 15 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

Overview

Package native is heraut's built-in, zero-external-dependency content generator (ADR-0032). This file covers commit collection: walking a git revision range into structured records and resolving the previous tag for compare links. Conventional-commit classification (T123), rendering (T124), and remote enrichment (Phase 2) build on it.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Generator

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

Generator is heraut's built-in, zero-external-dependency content generator (ADR-0032). It walks git history, classifies commits against the effective commits.types / rendering.excludes (propagated onto the ContentDriver by the app layer), and renders Markdown with internal templates. With a platform LinkContext it enriches commits with PR metadata via gh/glab (ADR-0034), honouring the remote_metadata policy; Degraded reports an optional fetch failure.

func New

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

New constructs a native Generator.

func (*Generator) Check

func (g *Generator) Check() error

Check verifies the generator is usable. native has no external dependency, so it always succeeds.

func (*Generator) Degraded

func (g *Generator) Degraded() bool

Degraded reports whether an optional remote-enrichment fetch failed during the last run.

func (*Generator) Generate

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

Generate produces the changelog (writing it to cfg.Output when set) or the release-notes string for tag, resolving commit/compare links against lc.

func (*Generator) Validate

func (g *Generator) Validate() error

Validate checks generator-specific config. native has no required config in Phase 1 (user templates are deferred — ADR-0033), so it always succeeds.

type Mode

type Mode int

Mode selects which content the native generator produces.

const (
	ModeChangelog Mode = iota
	ModeReleaseNotes
)

Jump to

Keyboard shortcuts

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