commitmessage

package
v0.0.0-...-a398c15 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CommitMessage

type CommitMessage struct {
	// contains filtered or unexported fields
}

func New

func New(log Logger, commitType CommitType) *CommitMessage

func (*CommitMessage) IsValidMessage

func (f *CommitMessage) IsValidMessage(message string) bool

func (*CommitMessage) PrettifyCommitMessage

func (f *CommitMessage) PrettifyCommitMessage(commitMessage string) (string, error)

prettifyCommitMessage aims to keep a short message based on the commit message, removing extra information such as commit type. Args:

commitMessage (string): Full commit message.

Returns:

string: Returns a commit message with limmited number of characters.
err: Error whenever unexpected issues happen.

type CommitType

type CommitType interface {
	GetAll() []string
	GetMajorUpgrade() []string
	GetMinorUpgrade() []string
	GetPatchUpgrade() []string
	GetSkipVersioning() []string
	GetCommitChangeType(commitMessage string) (string, error)
	IndexNotFound(index int) bool
}

type Logger

type Logger interface {
	Info(s string, args ...interface{})
	Error(s string, args ...interface{})
	Warn(s string, args ...interface{})
}

Jump to

Keyboard shortcuts

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