Documentation
¶
Index ¶
Constants ¶
View Source
const ( ModeUnreleased = "unreleased" ModeRelease = "release" )
Mode identifiers for changelog engine runs.
Variables ¶
This section is empty.
Functions ¶
func FormatAssemblyFailureMessage ¶
func FormatAssemblyFailureMessage(errors []section.AssemblyError) string
FormatAssemblyFailureMessage mirrors formatAssemblyFailureMessage in changelog-engine-factory.js.
func ValidateModeAndTargetVersion ¶
ValidateModeAndTargetVersion mirrors validateModeAndTargetVersion in changelog-engine-factory.js.
Types ¶
type FS ¶
type FS interface {
ReadFile(path string) ([]byte, error)
WriteFile(path string, data []byte, perm fs.FileMode) error
}
FS abstracts changelog file IO for Run.
type MergedPRGatherer ¶
type MergedPRGatherer interface {
GatherMergedPRs(ctx context.Context, owner, repo, compareRange string) ([]section.MergedPR, []string, error)
}
MergedPRGatherer lists merged Pull Requests reachable from the git compare range (mirrors JS engine). The second return value is soft-failure warnings (mirrors core.warning in the JS engine).
type Options ¶
type Options struct {
Mode string
TargetVersion string
Owner string
Repo string
ChangelogPath string
Now func() time.Time
FS FS
Git semver.Execer
Gather MergedPRGatherer
}
Options configures engine.Run — callers supply env-derived fields and adapters.
type Result ¶
type Result struct {
TargetVersionOutput string // empty when not release (matches JS target_version output)
PreviousTag string
CompareRange string
TargetBranch string // resolved canonical branch prior to TARGET_BRANCH override
SectionHeader string
HasPRs bool
HasUserFacingChanges bool
Included []section.IncludedPR
Excluded []section.ExcludedPR
SkippedChangelogUpdate bool
Warnings []string
}
Result summarizes engine execution for callers and CI outputs.
Click to show internal directories.
Click to hide internal directories.