convetionalcommit

package
v0.0.0-...-2267940 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 9, 2025 License: Apache-2.0, MIT Imports: 3 Imported by: 0

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL