commitparser

package
v0.0.0-...-ecd2f62 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TrailerKeyBreakingChangePrefix = "BREAKING"
	TrailerKeyBreakingChange       = TrailerKeyBreakingChangePrefix + " CHANGE"
	TrailerKeyBreakingChangeAlt    = TrailerKeyBreakingChangePrefix + "-" + TrailerKeyBreakingChange
)

Variables

View Source
var (
	ErrInvalidType              = errors.New("invalid commit type")
	ErrInvalidScope             = errors.New("invalid commit scope")
	ErrInvalidSubject           = errors.New("invalid commit subject")
	ErrInvalidMessage           = errors.New("invalid commit message")
	ErrInvalidTrailer           = errors.New("invalid trailer in commit message")
	ErrUnsupportedSpecialCommit = errors.New("unsupported special commit, please report this error if you think it should be supported")
)

Functions

This section is empty.

Types

type CommitMessage

type CommitMessage struct {
	Type     string
	Scope    string
	Subject  string
	Body     string
	Trailers map[string][]string
	Breaking bool
	Revert   bool
	Merge    bool
}

func Parse

func Parse(message string) (CommitMessage, error)

type ParseError

type ParseError struct {
	Pos int
	// contains filtered or unexported fields
}

func (ParseError) Error

func (err ParseError) Error() string

func (ParseError) Unwrap

func (err ParseError) Unwrap() error

Jump to

Keyboard shortcuts

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