Skip to content

Commit

Permalink
feat: create build Group in changelog generate. (#3448)
Browse files Browse the repository at this point in the history
  • Loading branch information
mo3et authored Oct 28, 2024
1 parent 4e9dac0 commit 225532d
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions cmd/kratos/internal/change/get.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ func ParseCommitsInfo(info []CommitInfo) string {
"fix": {},
"feat": {},
"deps": {},
"build": {},
"break": {},
"chore": {},
"other": {},
Expand All @@ -127,7 +128,7 @@ func ParseCommitsInfo(info []CommitInfo) string {
if index != -1 {
msg = msg[:index-1]
}
prefix := []string{"fix", "feat", "deps", "break", "chore"}
prefix := []string{"fix", "feat", "build", "deps", "break", "chore"}
var matched bool
for _, v := range prefix {
msg = strings.TrimPrefix(msg, " ")
Expand All @@ -153,6 +154,8 @@ func ParseCommitsInfo(info []CommitInfo) string {
text = "### New Features\n"
case "fix":
text = "### Bug Fixes\n"
case "build":
text = "### Builds\n"
case "chore":
text = "### Chores\n"
case "other":
Expand All @@ -166,7 +169,7 @@ func ParseCommitsInfo(info []CommitInfo) string {
md[key] += fmt.Sprintf("- %s\n", value)
}
}
return fmt.Sprint(md["break"], md["deps"], md["feat"], md["fix"], md["chore"], md["other"])
return fmt.Sprint(md["break"], md["deps"], md["feat"], md["fix"], md["build"], md["chore"], md["other"])
}

func ParseReleaseInfo(info ReleaseInfo) string {
Expand Down

0 comments on commit 225532d

Please sign in to comment.