conventionalcommit

package
v0.1.0-alpha.6 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2018 License: MPL-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const HeaderRegex = `^(\w*)(\(([^)]+)\))?:\s{1}(.*)($|\n{2})`

HeaderRegex is the regular expression used for Conventional Commits 1.0.0-beta.1.

View Source
const MaxNumberOfCommitCharacters = 72

MaxNumberOfCommitCharacters is the maximium number of characters allowed in a commit header.

View Source
const TypeFeat = "feat"

TypeFeat is a commit of the type fix patches a bug in your codebase (this correlates with PATCH in semantic versioning).

View Source
const TypeFix = "fix"

TypeFix is a commit of the type feat introduces a new feature to the codebase (this correlates with MINOR in semantic versioning).

Variables

This section is empty.

Functions

func ValidateDescription

func ValidateDescription(report *policy.Report, groups []string)

ValidateDescription returns the commit description.

func ValidateHeaderLength

func ValidateHeaderLength(report *policy.Report, groups []string)

ValidateHeaderLength checks the header length.

func ValidateScope

func ValidateScope(report *policy.Report, groups []string, scopes []string)

ValidateScope returns the commit scope.

func ValidateType

func ValidateType(report *policy.Report, groups []string, types []string)

ValidateType returns the commit type.

Types

type Conventional

type Conventional struct {
	Types  []string `mapstructure:"types"`
	Scopes []string `mapstructure:"scopes"`
}

Conventional implements the policy.Policy interface and enforces commit messages to conform the Conventional Commit standard.

func (*Conventional) Compliance

func (c *Conventional) Compliance(metadata *metadata.Metadata, options ...policy.Option) (report policy.Report)

Compliance implements the policy.Policy.Compliance function.

func (*Conventional) Pipeline

func (c *Conventional) Pipeline(*pipeline.Pipeline) policy.Option

Pipeline implements the policy.Policy.Pipeline function.

func (*Conventional) Tasks

func (c *Conventional) Tasks(map[string]*task.Task) policy.Option

Tasks implements the policy.Policy.Tasks function.

Jump to

Keyboard shortcuts

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