Documentation
¶
Overview ¶
Package text contains functions to parse Git Commit texts and some basic helpers for identifying type of commit by its message.
Index ¶
- func CheckMessageTitle(commit quoad.Commit, strict bool) error
- func FormatFailingCommits(commits []FailingCommit) table.Writer
- func IsInitialCommit(commitMessage string) bool
- func IsMergeCommit(message string) bool
- func IsRevertCommit(commitMessage string) bool
- func RequiredScopeChecker(requiredScopes []string) func(string) error
- type FailingCommit
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckMessageTitle ¶
CheckMessageTitle verifies that the message title conforms to conventional commit standard https://www.conventionalcommits.org/en/v1.0.0-beta.4/#summary
func FormatFailingCommits ¶
func FormatFailingCommits(commits []FailingCommit) table.Writer
FormatFailingCommits takes in slice of commit hashes and messages and formats it for nice output
func IsInitialCommit ¶
IsInitialCommit checks if a commit needs to be filtered, because it is the init commit of any given repo
func IsMergeCommit ¶
IsMergeCommit tests message string against expected format of a merge commit and returns true/false based on it
func IsRevertCommit ¶ added in v0.18.0
func RequiredScopeChecker ¶ added in v0.16.0
RequiredScopeChecker creates case sensitive strict checker, validating that provided scope matches one from required scopes list
Types ¶
type FailingCommit ¶
FailingCommit is just a formatted commit struct