mirror of
https://github.com/thegeeklab/git-sv.git
synced 2024-11-10 02:10:38 +00:00
parent
a1498c0832
commit
946024ce0b
@ -11,6 +11,7 @@ const (
|
||||
breakingChangeFooterKey = "BREAKING CHANGE"
|
||||
breakingChangeMetadataKey = "breaking-change"
|
||||
issueMetadataKey = "issue"
|
||||
messageRegexGroupName = "message"
|
||||
)
|
||||
|
||||
// CommitMessage is a message using conventional commits.
|
||||
@ -205,8 +206,8 @@ func (p MessageProcessorImpl) Parse(subject, body string) CommitMessage {
|
||||
filteredSubject := subject
|
||||
if p.messageCfg.MessageSelector != "" {
|
||||
subjectRegex := regexp.MustCompile(p.messageCfg.MessageSelector)
|
||||
subjectMessageIndex := regex.SubexpIndex("message")
|
||||
subjectMatch := regex.FindStringSubmatch(subject)
|
||||
subjectMessageIndex := subjectRegex.SubexpIndex(messageRegexGroupName)
|
||||
subjectMatch := subjectRegex.FindStringSubmatch(subject)
|
||||
|
||||
filteredSubject = subjectMatch[subjectMessageIndex]
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user