Documentation
¶
Overview ¶
Package proposal renders the Release merge request: its title and its body.
The body is machine-owned output, regenerated wholesale on every run exactly like the branch it describes. Colophon never reads it back.
That is a deliberate divergence from releaser-pleaser, which takes overrides from fenced blocks in its own merge-request body. Under a fast-forward merge a merge-request body never reaches git history unless the person merging chooses to squash, and squashing is optional here rather than required — so anything colophon must still know after the merge has to live in the repository. The version override is a `Release-As:` commit trailer and the settings are in `.colophon.yaml`, both of which survive any merge method.
Rendering is pure: it takes data and returns strings.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrMissingField = errors.New("release proposal: missing required field")
ErrMissingField reports a required input absent from an Input.
Functions ¶
func Title ¶
Title is the merge request's title, and also the release commit's message so the two cannot describe different releases.
It is separate from Render because the caller needs it BEFORE the body: the release branch is committed with this message, and only once that commit exists is the base known that the body reports.
Types ¶
type Input ¶
type Input struct {
// Version is the version being proposed, with or without a leading "v".
Version string
// Target is the branch being released from, and names the title's scope.
Target string
// Changelog is the already-rendered changelog section.
Changelog string
// Base is the target commit the release branch was cut from, reported so a
// reader can see which state of the target the proposal describes.
Base string
// Considered is how many commits were examined to reach this decision.
Considered int
}
Input is everything the body needs. All of it is data: nothing here reads a repository or a forge.