Version: v0.0.0-...-8daa82e Latest Latest

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

Go to latest
Published: May 7, 2021 License: MIT Imports: 5 Imported by: 0



Package angularcommit analyzes angular-style commit messages



This section is empty.


View Source
var (

	// DefaultOptions for angular commit Analyzer
	DefaultOptions = &Options{
		ChoreTypes:   []string{"chore", "docs", "test"},
		FixTypes:     []string{"fix", "refactor", "perf", "style"},
		FeatureTypes: []string{"feat"},
		BreakingChangeMarkers: []string{


This section is empty.


type Analyzer

type Analyzer struct {
	// contains filtered or unexported fields

Analyzer is a semrel.Analyzer instance that parses commits according to angularjs commit conventions

func New

func New() *Analyzer

New initializes Analyzer with DefaultOptions

func NewWithOptions

func NewWithOptions(options *Options) *Analyzer

NewWithOptions initializes Analyzer with options provided

func (*Analyzer) Analyze

func (analyzer *Analyzer) Analyze(commit *semrel.Commit) ([]semrel.Change, error)

Analyze implements semrel.Analyzer interface for angularcommit.Analyzer

func (*Analyzer) Lint

func (analyzer *Analyzer) Lint(message string) []error

Lint checks if message is fomatted according to rules specified in analyzer. Currently only checs the format of head line and that type is found.

type Change

type Change struct {
	FullHeader      string
	CommitType      string
	Scope           string
	Subject         string
	BreakingMessage string
	Hash            string
	// contains filtered or unexported fields

Change captures commit message analysis

func (*Change) BumpLevel

func (commit *Change) BumpLevel() semrel.BumpLevel

BumpLevel implements semrel.Change interface

func (*Change) Category

func (commit *Change) Category() string

Category implements semrel.Change interface

func (*Change) PreReleased

func (commit *Change) PreReleased() bool

PreReleased implements semrel.Change interface

type Options

type Options struct {
	ChoreTypes            []string
	FixTypes              []string
	FeatureTypes          []string
	BreakingChangeMarkers []string

Options control how angular commit analyzer behaves

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL