mirror of
https://github.com/thegeeklab/git-sv.git
synced 2024-11-24 11:10:39 +00:00
style: add dot om message godocs
This commit is contained in:
parent
de23ff9638
commit
0e7438b3a9
@ -111,7 +111,7 @@ func (p MessageProcessorImpl) Enhance(branch string, message string) (string, er
|
|||||||
return footer, nil
|
return footer, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// IssueID try to extract issue id from branch, return empty if not found
|
// IssueID try to extract issue id from branch, return empty if not found.
|
||||||
func (p MessageProcessorImpl) IssueID(branch string) (string, error) {
|
func (p MessageProcessorImpl) IssueID(branch string) (string, error) {
|
||||||
r, err := regexp.Compile(p.branchIssueRegex)
|
r, err := regexp.Compile(p.branchIssueRegex)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -125,7 +125,7 @@ func (p MessageProcessorImpl) IssueID(branch string) (string, error) {
|
|||||||
return groups[2], nil
|
return groups[2], nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// Format a commit message returning header, body and footer
|
// Format a commit message returning header, body and footer.
|
||||||
func (p MessageProcessorImpl) Format(msg CommitMessage) (string, string, string) {
|
func (p MessageProcessorImpl) Format(msg CommitMessage) (string, string, string) {
|
||||||
var header strings.Builder
|
var header strings.Builder
|
||||||
header.WriteString(msg.Type)
|
header.WriteString(msg.Type)
|
||||||
@ -149,7 +149,7 @@ func (p MessageProcessorImpl) Format(msg CommitMessage) (string, string, string)
|
|||||||
return header.String(), msg.Body, footer.String()
|
return header.String(), msg.Body, footer.String()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Parse a commit message
|
// Parse a commit message.
|
||||||
func (p MessageProcessorImpl) Parse(subject, body string) CommitMessage {
|
func (p MessageProcessorImpl) Parse(subject, body string) CommitMessage {
|
||||||
commitType, scope, description, hasBreakingChange := parseSubjectMessage(subject)
|
commitType, scope, description, hasBreakingChange := parseSubjectMessage(subject)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user