commitanalyser

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ConventionalCommitPattern = `(?P<type>[A-Za-z]+)((?:\((?P<scope>[^()\r\n]*)\)|\()?(?P<breaking>!)?)(:\s?(?P<subject>.*))?`

ConventionalCommitPattern is a regex pattern of the Conventional Commits spec - https://www.conventionalcommits.org/en/v1.0.0/

View Source
var DefaultReleaseVersionRules = []CommitVersionRule{
	{
		Type:    `feat`,
		Release: `minor`,
	},
	{
		Type:    `refactor`,
		Release: `minor`,
	},
	{
		Type:    `fix`,
		Release: `patch`,
	},
	{
		Type:    `ci`,
		Release: `patch`,
	},
	{
		Type:    `build`,
		Release: `patch`,
	},
	{
		Type:    `docs`,
		Release: `patch`,
	},
	{
		Type:    `perf`,
		Release: `patch`,
	},
	{
		Type:    `test`,
		Release: `patch`,
	},
	{
		Type:    `style`,
		Release: `patch`,
	},
	{
		Type:    `chore`,
		Release: `patch`,
	},
}

Functions

func DeterminateNextReleaseVersion

func DeterminateNextReleaseVersion(commits []vcsapi.Commit, commitPatternList []string, rules []CommitVersionRule, previousVersionStr string) (string, error)

Types

type CommitVersionRule

type CommitVersionRule struct {
	Type    string
	Scope   string
	Release string // major / minor / patch
}

Jump to

Keyboard shortcuts

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