Documentation
¶
Overview ¶
Package conventionalcommit provides parsing and validation for conventional commit messages.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // ErrInvalidFormat indicates the commit message doesn't match conventional format. ErrInvalidFormat = errors.New("invalid conventional commit format") // ErrEmptyMessage indicates the commit message is empty. ErrEmptyMessage = errors.New("empty commit message") )
Functions ¶
This section is empty.
Types ¶
type Commit ¶
type Commit struct {
Type string
Scope string
Description string
Body string
Raw string
TicketRefs []TicketRef
Breaking bool
}
Commit represents a parsed conventional commit message.
func (*Commit) GetJIRATickets ¶
GetJIRATickets returns all JIRA ticket references.
func (*Commit) HasJIRATicket ¶
HasJIRATicket returns true if the commit has JIRA ticket references.
func (*Commit) HasTicketRefs ¶
HasTicketRefs returns true if the commit has any ticket references.
type Parser ¶
type Parser struct {
// StrictMode enforces strict conventional commit format.
StrictMode bool
// AllowEmptyScope permits commits without scope.
AllowEmptyScope bool
}
Parser provides conventional commit parsing with configurable options.
func DefaultParser ¶
func DefaultParser() *Parser
DefaultParser returns a parser with default settings.