Documentation
¶
Overview ¶
Package commit provides conventional commit message parsing.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BumpMapping ¶ added in v0.4.9
BumpMapping maps conventional commit types to their bump levels. Types not present in the map produce BumpNone. Breaking commits always produce BumpMajor regardless of mapping.
func DefaultBumpMapping ¶ added in v0.4.9
func DefaultBumpMapping() BumpMapping
DefaultBumpMapping returns the default mapping: feat→minor, fix/perf→patch.
type BumpType ¶
type BumpType = string
func DetermineBump ¶
func DetermineBump(commits []Commit, mapping BumpMapping) BumpType
type Commit ¶
type Commit struct {
Hash string
Type string
Scope string
Description string
Body string
Breaking bool
Raw string
}
func FilterByTypes ¶
func Parse ¶
Parse parses a raw commit message into a Commit. If the message does not follow the conventional commit format, it returns a Commit with an empty Type.
func (Commit) IsConventional ¶
Click to show internal directories.
Click to hide internal directories.