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"},
|
||||
ReleaseNotes: sv.ReleaseNotesConfig{Headers: map[string]string{"fix": "Bug Fixes", "feat": "Features", "breaking-change": "Breaking Changes"}},
|
||||
Branches: sv.BranchesConfig{
|
||||
PrefixRegex: "([a-z]+\\/)?",
|
||||
SuffixRegex: "(-.*)?",
|
||||
Prefix: "([a-z]+\\/)?",
|
||||
Suffix: "(-.*)?",
|
||||
DisableIssue: false,
|
||||
Skip: []string{"master", "main", "developer"},
|
||||
SkipDetached: &skipDetached,
|
||||
|
@ -40,8 +40,8 @@ type CommitMessageIssueConfig struct {
|
||||
|
||||
// BranchesConfig branches preferences.
|
||||
type BranchesConfig struct {
|
||||
PrefixRegex string `yaml:"prefix"`
|
||||
SuffixRegex string `yaml:"suffix"`
|
||||
Prefix string `yaml:"prefix"`
|
||||
Suffix string `yaml:"suffix"`
|
||||
DisableIssue bool `yaml:"disable-issue"`
|
||||
Skip []string `yaml:"skip,flow"`
|
||||
SkipDetached *bool `yaml:"skip-detached"`
|
||||
|
@ -160,7 +160,7 @@ func (p MessageProcessorImpl) IssueID(branch string) (string, error) {
|
||||
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)
|
||||
if err != nil {
|
||||
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 {
|
||||
return BranchesConfig{
|
||||
PrefixRegex: "([a-z]+\\/)?",
|
||||
SuffixRegex: "(-.*)?",
|
||||
Prefix: "([a-z]+\\/)?",
|
||||
Suffix: "(-.*)?",
|
||||
Skip: []string{"develop", "master"},
|
||||
SkipDetached: &skipDetached,
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user