Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: create build Group in changelog generate. #3448

Merged
merged 2 commits into from
Oct 28, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading