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 Author ¶ added in v0.48.0
type Author struct {
Name string
Email string
Username string // platform handle, e.g. "octocat"; empty offline
}
Author is a contributor identity: git-first (Name/Email always present), with an optional platform handle resolved from remote enrichment. Email is the first_time identity key.
type Contributor ¶ added in v0.48.0
type Contributor struct {
Author Author
IsFirstTime bool
PR *PullRequest // their first PR in this release; nil offline
}
Contributor is a per-release contributor for the "New Contributors" block.
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 ¶
New constructs a native Generator. The httpClient is used only by the Azure DevOps enrichment path (ADR-0035); GitHub/GitLab enrichment rides the runner via gh/glab.
func (*Generator) Check ¶
Check verifies the generator is usable. native has no external dependency, so it always succeeds.
func (*Generator) Degraded ¶
Degraded reports whether an optional remote-enrichment fetch failed during the last run.
type PullRequest ¶ added in v0.48.0
type PullRequest struct {
Number int
URL string
AuthorLogin string // PR author handle (drives "by @login")
RefPrefix string
Title string
Labels []string
Platforms map[string]any
}
PullRequest is the normalized PR/MR for a commit: flat common fields plus a per-platform escape hatch. RefPrefix is "!" for GitLab MRs and Azure DevOps PRs; GitHub leaves it empty and prRef (render.go) defaults it to "#". It is derived at fetch time.