|
|
|
@ -132,6 +132,7 @@ func ParseCommitsInfo(info []CommitInfo) string { |
|
|
|
|
"feat": {}, |
|
|
|
|
"deps": {}, |
|
|
|
|
"break": {}, |
|
|
|
|
"chore": {}, |
|
|
|
|
"other": {}, |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -141,9 +142,10 @@ func ParseCommitsInfo(info []CommitInfo) string { |
|
|
|
|
if index != -1 { |
|
|
|
|
msg = msg[:index-1] |
|
|
|
|
} |
|
|
|
|
prefix := []string{"fix", "feat", "deps", "break"} |
|
|
|
|
prefix := []string{"fix", "feat", "deps", "break", "chore"} |
|
|
|
|
var matched bool |
|
|
|
|
for _, v := range prefix { |
|
|
|
|
msg = strings.TrimPrefix(msg, " ") |
|
|
|
|
if strings.HasPrefix(msg, v) { |
|
|
|
|
group[v] = append(group[v], msg) |
|
|
|
|
matched = true |
|
|
|
@ -166,6 +168,8 @@ func ParseCommitsInfo(info []CommitInfo) string { |
|
|
|
|
text = "### New Features\n" |
|
|
|
|
case "fix": |
|
|
|
|
text = "### Bug Fixes\n" |
|
|
|
|
case "chore": |
|
|
|
|
text = "### Chores\n" |
|
|
|
|
case "other": |
|
|
|
|
text = "### Others\n" |
|
|
|
|
} |
|
|
|
@ -176,7 +180,7 @@ func ParseCommitsInfo(info []CommitInfo) string { |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
return fmt.Sprint(md["break"], md["deps"], md["feat"], md["fix"], md["other"]) |
|
|
|
|
return fmt.Sprint(md["break"], md["deps"], md["feat"], md["fix"], md["chore"], md["other"]) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
func ParseReleaseInfo(info ReleaseInfo) string { |
|
|
|
@ -220,4 +224,4 @@ func ParseGithubUrl(url string) (owner string, repo string) { |
|
|
|
|
func fatal(err error) { |
|
|
|
|
fmt.Fprintf(os.Stderr, "\033[31mERROR: %s\033[m\n", err) |
|
|
|
|
os.Exit(1) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|