config

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: May 29, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	AppConfig Config

	// Version is the version of the application. It will be set by the build script.
	Version string

	ErrCommitMsgFileDoesNotSpecified = fmt.Errorf("commit msg file does not specified on args, please check your git hook")
)

Functions

func Init

func Init() error

Types

type Config

type Config struct {
	// Committers is a list of committers. It can be nil.
	Committers []model.Committer `yaml:"committers,omitempty"`

	// CommitMessageFilePath is the path of the file that will be used as the commit message.
	// It will be provided by Git when it's called as a prepare-commit-msg hook.
	CommitMessageFilePath string `yaml:"-"`

	// CommitSource specifies the source of the commit message.
	// It will be provided by Git when it's called as a prepare-commit-msg hook.
	// It can be one of the following values:
	// - "message": The commit message is provided by the user.
	// - "template": The commit message is provided by Git when it's called as a prepare-commit-msg hook.
	// - "merge": The commit message is provided by Git when it's called as a prepare-commit-msg hook.
	// - "squash": The commit message is provided by Git when it's called as a prepare-commit-msg hook.
	CommitSource string `yaml:"-"`

	// CommitSHA1 is the SHA1 of the commit.
	CommitSHA1 string `yaml:"-"`
}

Jump to

Keyboard shortcuts

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