0
0
mirror of https://github.com/thegeeklab/git-sv.git synced 2024-11-24 11:10:39 +00:00

feat: change some config arrays to yaml inline arrays for better readability

issue: #24
This commit is contained in:
Beatriz Vieira 2021-07-30 20:58:10 -03:00
parent 13c2558d2a
commit 206f6a9105

View File

@ -4,7 +4,7 @@ package sv
// CommitMessageConfig config a commit message. // CommitMessageConfig config a commit message.
type CommitMessageConfig struct { type CommitMessageConfig struct {
Types []string `yaml:"types"` Types []string `yaml:"types,flow"`
Scope CommitMessageScopeConfig `yaml:"scope"` Scope CommitMessageScopeConfig `yaml:"scope"`
Footer map[string]CommitMessageFooterConfig `yaml:"footer"` Footer map[string]CommitMessageFooterConfig `yaml:"footer"`
Issue CommitMessageIssueConfig `yaml:"issue"` Issue CommitMessageIssueConfig `yaml:"issue"`
@ -26,7 +26,7 @@ type CommitMessageScopeConfig struct {
// CommitMessageFooterConfig config footer metadata. // CommitMessageFooterConfig config footer metadata.
type CommitMessageFooterConfig struct { type CommitMessageFooterConfig struct {
Key string `yaml:"key"` Key string `yaml:"key"`
KeySynonyms []string `yaml:"key-synonyms"` KeySynonyms []string `yaml:"key-synonyms,flow"`
UseHash bool `yaml:"use-hash"` UseHash bool `yaml:"use-hash"`
AddValuePrefix string `yaml:"add-value-prefix"` AddValuePrefix string `yaml:"add-value-prefix"`
} }
@ -43,7 +43,7 @@ type BranchesConfig struct {
PrefixRegex string `yaml:"prefix"` PrefixRegex string `yaml:"prefix"`
SuffixRegex string `yaml:"suffix"` SuffixRegex string `yaml:"suffix"`
DisableIssue bool `yaml:"disable-issue"` DisableIssue bool `yaml:"disable-issue"`
Skip []string `yaml:"skip"` Skip []string `yaml:"skip,flow"`
SkipDetached *bool `yaml:"skip-detached"` SkipDetached *bool `yaml:"skip-detached"`
} }
@ -51,9 +51,9 @@ type BranchesConfig struct {
// VersioningConfig versioning preferences. // VersioningConfig versioning preferences.
type VersioningConfig struct { type VersioningConfig struct {
UpdateMajor []string `yaml:"update-major"` UpdateMajor []string `yaml:"update-major,flow"`
UpdateMinor []string `yaml:"update-minor"` UpdateMinor []string `yaml:"update-minor,flow"`
UpdatePatch []string `yaml:"update-patch"` UpdatePatch []string `yaml:"update-patch,flow"`
IgnoreUnknown bool `yaml:"ignore-unknown"` IgnoreUnknown bool `yaml:"ignore-unknown"`
} }