settings

package
v2.1.4 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2024 License: GPL-3.0 Imports: 20 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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 RegexBodyFooter *regexp.Regexp
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 {
				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"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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