Documentation ¶
Index ¶
Constants ¶
View Source
const ( LUA = "lua" SH = "sh" BEFORE = "before" AFTER = "after" LIST = "list" CONFIRM = "confirm" INPUT = "input" )
Variables ¶
View Source
var ExitCodeStardard map[string]ExitCode = map[string]ExitCode{ "ExpectedExit": { Exception: "ExpectedExit", ExitCode: 0, Description: "Expected exit", }, "FileSetupExist": { Exception: "FileSetupExist", ExitCode: 1, Description: "there is .xconv.yaml configuration in the repository", }, "NotAGitProjectError": { Exception: "NotAGitProjectError", ExitCode: 2, Description: "not a git repository (or any of the parent directories): .git", }, "NoCommitsFoundError": { Exception: "NoCommitsFoundError", ExitCode: 3, Description: "no commit found", }, "NoVersionSpecifiedError": { Exception: "NoCommitsFoundError", ExitCode: 4, Description: "version can not be found in configuration file [.xconv.yaml]", }, "NoPermissionOnDir": { Exception: "NoPermissionOnDir", ExitCode: 5, Description: ".xconv.yaml file cannot be create in the current directory", }, "BumpRegexInvalid": { Exception: "BumpRegexInvalid", ExitCode: 6, Description: "bump.pattern in .xconv.yaml invalid", }, "GitNotFound": { Exception: "GitNotFound", ExitCode: 7, Description: "git not found!. visit <https://git-scm.com/> to install", }, "NothingToCommitError": { Exception: "NothingToCommitError", ExitCode: 11, Description: "nothing in staging to be committed", }, "MissingConfigError": { Exception: "MissingConfigError", ExitCode: 15, Description: "configuration missed for .xconv.yaml", }, "CurrentVersionNotFoundError": { Exception: "CurrentVersionNotFoundError", ExitCode: 17, Description: "current version cannot be found in version_files", }, "InvalidConfigurationError": { Exception: "InvalidConfigurationError", ExitCode: 19, Description: "an error was found in the xconv configuration", }, "NoneIncrementExit": { Exception: "InvalidConfigurationError", ExitCode: 21, Description: "the commits found are not elegible to be bumped", }, "InvalidScriptFilter": { Exception: "InvalidScriptFilter", ExitCode: 22, Description: "an error was found in the script", }, "InvalidProfile": { Exception: "InvalidProfile", ExitCode: 23, Description: "profiles have recursive inheritance", }, "ActiveProfileNotFound": { Exception: "ActiveProfileNotFound", ExitCode: 24, Description: "active profiles not found in .xconv.yaml", }, }
https://github.com/commitizen-tools/commitizen/blob/master/docs/exit_codes.md
View Source
var Filename string = ".xconv.yaml"
View Source
var XCONVFileContent []byte
View Source
var XCONVInitialtContent []byte
Functions ¶
This section is empty.
Types ¶
type Configuration ¶
func NewConfiguration ¶
func NewConfiguration() Configuration
type Filter ¶
type Filter struct { ScriptBase `yaml:",inline"` Retry bool `yaml:"retry"` Message Message `yaml:"message"` }
type Middleware ¶
type Middleware struct {
ScriptBase `yaml:",inline"`
}
func (Middleware) Run ¶
func (middleware Middleware) Run(args ...string) string
type Profile ¶
type Profile struct { Bump Bump `yaml:"bump"` Name string `yaml:"name"` CommitParser string `yaml:"commit_parser"` ChangeTypeOrder []string `yaml:"change_type_order"` Example string `yaml:"example"` MessageTemplate string `yaml:"message_template"` Questions []Question `yaml:"questions"` Schema string `yaml:"schema"` Tag Tag `yaml:"tag"` Extends string `yaml:"extends"` // contains filtered or unexported fields }
type Rule ¶
type Rule struct { Version string `yaml:"version"` ActiveProfile string `yaml:"active_profile"` ChangelogFile string `yaml:"changelog_file"` Profiles []Profile `yaml:"profiles"` }
func (*Rule) FindCurrentProfileEnable ¶
func (*Rule) FindProfileByName ¶ added in v0.12.0
func (*Rule) ReplaceProfile ¶ added in v0.12.0
type Script ¶
type Script struct { Ignore []string `yaml:"ignore"` Filter []Filter `yaml:"filters"` Middleware []Middleware `yaml:"middlewares"` Task []Task `yaml:"tasks"` }
func (*Script) FindAllFilters ¶
func (*Script) FindAllMiddlewares ¶
func (sc *Script) FindAllMiddlewares() map[string]Middleware
func (*Script) FindByMiddlewareName ¶
func (sc *Script) FindByMiddlewareName(name string) (Middleware, bool)
type ScriptBase ¶
Click to show internal directories.
Click to hide internal directories.