commit

package
v0.20.1 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrEmptyCommitMessage is returned when the commit message is empty
	ErrEmptyCommitMessage error = errors.New("error: empty commmit messager")
)

Functions

This section is empty.

Types

type Commit

type Commit struct {
	Type       string // Define commit type, like chore, fix, etc
	Scope      string // Define commit type scope
	Footers    string // Define commit footer
	Title      string // Define commit title
	Body       string // Define commit body
	HideCredit bool   // Display updatecli credits inside commit message body
}

Commit contains conventional commit information More information on what is conventional commits -> https://www.conventionalcommits.org/en/v1.0.0/#summary

func (*Commit) Generate

func (c *Commit) Generate(raw string) (string, error)

Generate generates the conventional commit

func (*Commit) ParseMessage

func (c *Commit) ParseMessage(message string) (err error)

ParseMessage parses a message then return the commit message title and its body. The message title can't be longer than 72 characters

func (*Commit) Validate

func (c *Commit) Validate() error

Validate validates "conventional commit" default parameters.

Jump to

Keyboard shortcuts

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