hook

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2018 License: MIT Imports: 11 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RewriteCommitMessage

func RewriteCommitMessage(commitMessageFile string, commitMessageModifier CommitMessageModifier) error

RewriteCommitMessage rewrites the commit message in the given commit message file

Types

type CommitMessageModifier

type CommitMessageModifier interface {
	ModifyGitCommitMessage(gitCommitMessage, branchName string) (modifiedCommitMessage string, err error)
}

CommitMessageModifier implements the modification of a given commit message and the current branch name.

func NewCommitMessageModifier

func NewCommitMessageModifier(projectConfiguration config.Project) CommitMessageModifier

NewCommitMessageModifier create a CommitMessageModifier

type CommitMessageRenderer

type CommitMessageRenderer interface {
	Render(viewModel ViewModel) (string, error)
}

CommitMessageRenderer implements rendering a commit message by a given

func NewCommitMessageRenderer

func NewCommitMessageRenderer(projConf config.Project) CommitMessageRenderer

NewCommitMessageRenderer create a new CommitMessageRenderer

type CommitMessageValidator

type CommitMessageValidator interface {
	Validate(branchName, commitMessage string) error
}

CommitMessageValidator implementa validation for a given commit message

func NewCommitMessageValidator

func NewCommitMessageValidator(projectConfig config.Project) CommitMessageValidator

NewCommitMessageValidator creates a new CommitMessageValidator

type ViewModel

type ViewModel struct {
	BranchName    string
	CommitMessage string
}

ViewModel defines all variables that can be in templates to define the modified commit message

Jump to

Keyboard shortcuts

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