Documentation ¶
Index ¶
Constants ¶
const ( TypeEnhancement = EntryType("enhancement") TypeBugfix = EntryType("bugfix") TypeSecurity = EntryType("security") TypeBreaking = EntryType("breaking") // TypeDependency is the entry bump for a dependency bump. It is better, however, to encode dependency changes in // Changelog.Dependencies rather than Changelog.Changes as that allows for smarter semver bumping and richer format. TypeDependency = EntryType("dependency") )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Changelog ¶
type Changelog struct { // Held is true if this changelog should not be released without human intervention. Held bool `yaml:"held,omitempty"` // Notes is a markdown snippet that will be rendered just below the version header. Notes string `yaml:"notes"` // Changes is a list of changes that have been made since the last release. // They have a description and a bump.Type, and may optionally include metadata about the author, PR, or commit when // they were introduced. Changes []Entry `yaml:"changes"` // Dependencies is a list of the dependencies that have been bumped, optionally including info about from which // to which version they were. Dependencies []Dependency `yaml:"dependencies"` }
Changelog models a machine-readable changelog.
type Dependency ¶
type Dependency struct { Name string `yaml:"name"` From *semver.Version `yaml:"from,omitempty"` To *semver.Version `yaml:"to,omitempty"` // Link to the changelog for the release of this dependency. Changelog string `yaml:"changelog"` Meta EntryMeta `yaml:"meta,omitempty"` }
Dependency models a dependency that has been changed in the project.
func (Dependency) BumpType ¶
func (d Dependency) BumpType() bump.Type
BumpType returns which version should be bumped due to this dependency update. In practice, this is the same as the bump the dependency had.
func (Dependency) Change ¶
func (d Dependency) Change() string
func (Dependency) MarshalYAML ¶
func (d Dependency) MarshalYAML() (interface{}, error)
MarshalYAML copies the contents of Dependency to a plainDependency and returns it for the generic marshaler to encode it.
func (Dependency) String ¶
func (d Dependency) String() string
Strings outputs a human-readable one-liner of the dependency update, including extra information if found.
func (*Dependency) UnmarshalYAML ¶
func (d *Dependency) UnmarshalYAML(value *yaml.Node) error
UnmarshalYAML decodes the node into a plainDependency and copies it over to the real Dependency.
type Entry ¶
type Entry struct { // Type holds which bump this change was: A bug fix, a new feature, etc. See EntryType. Type EntryType `yaml:"type"` // Message is a human-readable one-liner summarizing the change. Message string `yaml:"message"` // Meta holds information about who made the change and where. Meta EntryMeta `yaml:"meta,omitempty"` }
Entry is a representation of a change that has been made in the code.
Directories ¶
Path | Synopsis |
---|---|
Package linker implements linking dependency changelogs when they get updated.
|
Package linker implements linking dependency changelogs when they get updated. |
sources
|
|
markdown
Package markdown implements sourcing unreleased entries from https://keepachangelog.com/en/1.0.0/
|
Package markdown implements sourcing unreleased entries from https://keepachangelog.com/en/1.0.0/ |
markdown/merger
Package merger contains the Merger object, which incorporates a changelog.Changelog into a full markdown changelog.
|
Package merger contains the Merger object, which incorporates a changelog.Changelog into a full markdown changelog. |