Documentation
¶
Index ¶
Constants ¶
View Source
const ConfigFileName types.ConfigPath = "autogit.yml"
View Source
const ToolName = "autogit"
Variables ¶
View Source
var ConfigExample string
View Source
var HookFolderName = fmt.Sprintf(".%s-hooks", ToolName)
View Source
var RegexConventionalCommit []*regexp.Regexp = []*regexp.Regexp{}
View Source
var RegexIssue *regexp.Regexp
View Source
var RegexPrerelease *regexp.Regexp
View Source
var RegexPullRequest *regexp.Regexp
View Source
var RegexScope *regexp.Regexp
View Source
var RegexSemVer *regexp.Regexp
View Source
var RegexType *regexp.Regexp
Functions ¶
func GetAutogitVersion ¶
func GetAutogitVersion() string
func GetGlobalConfigPath ¶
func GetGlobalConfigPath() types.ConfigPath
func GetProjectConfigPath ¶
func GetProjectConfigPath() types.ConfigPath
Types ¶
type ChangelogScheme ¶
type ChangelogScheme struct {
REPOSITORY_OWNER string `yaml:"REPOSITORY_OWNER"`
REPOSITORY_NAME string `yaml:"REPOSITORY_NAME"`
CommitURL utils_types.TemplateExpression `yaml:"commitUrl"`
CommitRangeURL utils_types.TemplateExpression `yaml:"commitRangeUrl"`
IssueURL utils_types.TemplateExpression `yaml:"issueUrl"`
MergeCommits struct {
MustHaveLinkedPR bool `yaml:"must_have_linked_pull_request"`
RedirectMergingCommits bool `yaml:"redirect_merging_to_semver_sections_for_changelog"`
MergeTypes []conventionalcommitstype.Type `yaml:"commit_types"`
} `yaml:"merge_commits"`
Headings struct {
SemverMajor changelog_types.ChangelogSectionName `yaml:"semver_major"`
SemverMinor changelog_types.ChangelogSectionName `yaml:"semver_minor"`
SemverPatch changelog_types.ChangelogSectionName `yaml:"semver_patch"`
MergeCommits struct {
Default changelog_types.ChangelogSectionName `yaml:"default"`
WithLinkedPR changelog_types.ChangelogSectionName `yaml:"with_linked_pr"`
PrefixForUndirected string `yaml:"prefix_for_undirected"`
} `yaml:"merge_commits"`
}
}
type ConfigScheme ¶
type ConfigScheme struct {
Changelog ChangelogScheme `yaml:"changelog"`
Regex RegexScheme `yaml:"regex"`
Validation ValidationScheme `yaml:"validation"`
Git struct {
SSHPath string `yaml:"sshPath"`
} `yaml:"git"`
}
func GetConfig ¶
func GetConfig() ConfigScheme
func NewConfig ¶
func NewConfig(configPath types.ConfigPath) *ConfigScheme
type RegexScheme ¶
type RegexScheme struct {
ConventionalCommit struct {
Headers []utils_types.RegExp `yaml:"headers"`
BodyFooter utils_types.RegExp `yaml:"bodyFooter"`
} `yaml:"conventionalCommit"`
Issue utils_types.RegExp `yaml:"issue"`
PullRequestRegex utils_types.RegExp `yaml:"pull_request"`
SemVer utils_types.RegExp `yaml:"semVer"`
Prerelease utils_types.RegExp `yaml:"prerelease"`
Validation struct {
Scope struct {
Lowercase utils_types.RegExp `yaml:"lowercase"`
} `yaml:"scope"`
Type struct {
Lowercase utils_types.RegExp `yaml:"lowercase"`
} `yaml:"type"`
} `yaml:"validation"`
}
type TypeAllowLists ¶
type TypeAllowLists struct {
SemVerMinorIncreasers []conventionalcommitstype.Type `yaml:"semver_minor_increases"`
SemverPatchIncreasers []conventionalcommitstype.Type `yaml:"semver_patch_increases"`
ForCommitMsgCheckOnly []conventionalcommitstype.Type `yaml:"for_commit_msg_check_only"`
}
func (TypeAllowLists) GetAllTypes ¶
func (a TypeAllowLists) GetAllTypes() []conventionalcommitstype.Type
type ValidationScheme ¶
type ValidationScheme struct {
Sections struct {
Hook struct {
CommitMsg struct {
Enabled bool `yaml:"enabled"`
} `yaml:"commitMsg"`
} `yaml:"hook"`
} `yaml:"sections"`
Rules struct {
Issue struct {
Present bool `yaml:"present"`
} `yaml:"issue"`
Header struct {
MaxLength int `yaml:"maxLength"`
Type struct {
Lowercase bool `yaml:"lowercase"`
Allowlists TypeAllowLists `yaml:"allowlists"`
} `yaml:"type"`
Scope struct {
AnyMustBePresent bool `yaml:"any_must_be_present"`
EnforcedForTypes []conventionalcommitstype.Type `yaml:"enforced_for_commit_types"`
Lowercase bool `yaml:"lowercase"`
Allowlist []conventionalcommitstype.Scope `yaml:"allowlist"`
} `yaml:"scope"`
Subject struct {
MinWords int `yaml:"minWords"`
} `yaml:"subject"`
} `yaml:"header"`
} `yaml:"rules"`
}
Click to show internal directories.
Click to hide internal directories.