Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConventionalCommit ¶
type ConventionalCommit struct {
// contains filtered or unexported fields
}
ConventionalCommit is a helper type for working with conventional commits. It wraps the go-conventionalcommits package and provides a simpler interface.
func FilterConventionalCommits ¶
func FilterConventionalCommits(commits []*object.Commit) []*ConventionalCommit
FilterConventionalCommits takes a slice of git commits and returns only those that follow the conventional commits specification. Commits that fail parsing are ignored.
func New ¶
func New(commit *object.Commit) *ConventionalCommit
New creates a new ConventionalCommit instance from a git commit object.
func (*ConventionalCommit) GetCommit ¶
func (cc *ConventionalCommit) GetCommit() *object.Commit
GetCommit returns the underlying git commit object.
func (*ConventionalCommit) IsConventional ¶
func (cc *ConventionalCommit) IsConventional() bool
IsConventional returns true if the commit message follows the conventional commits specification.
func (*ConventionalCommit) Parse ¶
func (cc *ConventionalCommit) Parse() (conventionalcommits.Message, error)
Parse returns the parsed conventional commit data and any parsing error. If the commit is not conventional, the error will be non-nil.