mirror of
https://github.com/thegeeklab/git-sv.git
synced 2024-11-24 11:10:39 +00:00
refactor: fix tagliatelle yaml lint
This commit is contained in:
parent
77152fcd52
commit
6184ac3ad4
@ -76,8 +76,8 @@ func defaultConfig() Config {
|
|||||||
Tag: sv.TagConfig{Pattern: "%d.%d.%d"},
|
Tag: sv.TagConfig{Pattern: "%d.%d.%d"},
|
||||||
ReleaseNotes: sv.ReleaseNotesConfig{Headers: map[string]string{"fix": "Bug Fixes", "feat": "Features", "breaking-change": "Breaking Changes"}},
|
ReleaseNotes: sv.ReleaseNotesConfig{Headers: map[string]string{"fix": "Bug Fixes", "feat": "Features", "breaking-change": "Breaking Changes"}},
|
||||||
Branches: sv.BranchesConfig{
|
Branches: sv.BranchesConfig{
|
||||||
PrefixRegex: "([a-z]+\\/)?",
|
Prefix: "([a-z]+\\/)?",
|
||||||
SuffixRegex: "(-.*)?",
|
Suffix: "(-.*)?",
|
||||||
DisableIssue: false,
|
DisableIssue: false,
|
||||||
Skip: []string{"master", "main", "developer"},
|
Skip: []string{"master", "main", "developer"},
|
||||||
SkipDetached: &skipDetached,
|
SkipDetached: &skipDetached,
|
||||||
|
@ -40,8 +40,8 @@ type CommitMessageIssueConfig struct {
|
|||||||
|
|
||||||
// BranchesConfig branches preferences.
|
// BranchesConfig branches preferences.
|
||||||
type BranchesConfig struct {
|
type BranchesConfig struct {
|
||||||
PrefixRegex string `yaml:"prefix"`
|
Prefix string `yaml:"prefix"`
|
||||||
SuffixRegex string `yaml:"suffix"`
|
Suffix string `yaml:"suffix"`
|
||||||
DisableIssue bool `yaml:"disable-issue"`
|
DisableIssue bool `yaml:"disable-issue"`
|
||||||
Skip []string `yaml:"skip,flow"`
|
Skip []string `yaml:"skip,flow"`
|
||||||
SkipDetached *bool `yaml:"skip-detached"`
|
SkipDetached *bool `yaml:"skip-detached"`
|
||||||
|
@ -160,7 +160,7 @@ func (p MessageProcessorImpl) IssueID(branch string) (string, error) {
|
|||||||
return "", nil
|
return "", nil
|
||||||
}
|
}
|
||||||
|
|
||||||
rstr := fmt.Sprintf("^%s(%s)%s$", p.branchesCfg.PrefixRegex, p.messageCfg.Issue.Regex, p.branchesCfg.SuffixRegex)
|
rstr := fmt.Sprintf("^%s(%s)%s$", p.branchesCfg.Prefix, p.messageCfg.Issue.Regex, p.branchesCfg.Suffix)
|
||||||
r, err := regexp.Compile(rstr)
|
r, err := regexp.Compile(rstr)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return "", fmt.Errorf("could not compile issue regex: %s, error: %v", rstr, err.Error())
|
return "", fmt.Errorf("could not compile issue regex: %s, error: %v", rstr, err.Error())
|
||||||
|
@ -55,8 +55,8 @@ var ccfgWithScope = CommitMessageConfig{
|
|||||||
|
|
||||||
func newBranchCfg(skipDetached bool) BranchesConfig {
|
func newBranchCfg(skipDetached bool) BranchesConfig {
|
||||||
return BranchesConfig{
|
return BranchesConfig{
|
||||||
PrefixRegex: "([a-z]+\\/)?",
|
Prefix: "([a-z]+\\/)?",
|
||||||
SuffixRegex: "(-.*)?",
|
Suffix: "(-.*)?",
|
||||||
Skip: []string{"develop", "master"},
|
Skip: []string{"develop", "master"},
|
||||||
SkipDetached: &skipDetached,
|
SkipDetached: &skipDetached,
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user