WIP: commit msg parser #39

Closed
周赵嘉程521432910016 wants to merge 24 commits from commit-parser into master
Showing only changes of commit 424cfef91d - Show all commits

View File

@ -124,20 +124,6 @@ func commitMsgToConf() (conf Conf, err error) {
head := words[0] head := words[0]
var hw string var hw string
msg := commit.Message
slog.Debug("commit msg to conf", "msg", msg)
if msg == "" {
conf, err = parseConfFile(file)
return
}
line := strings.Split(msg, "\n")[0]
words := strings.Fields(line)
head := words[0]
var hw string
if strings.HasSuffix(head, ":") || strings.HasSuffix(head, ".") { if strings.HasSuffix(head, ":") || strings.HasSuffix(head, ".") {
head = head[:len(head)-1] head = head[:len(head)-1]
} }