Skip to content

Commit

Permalink
fix: omit changelog categories that are empty (#1776)
Browse files Browse the repository at this point in the history
  • Loading branch information
cgrinds authored Feb 24, 2023
1 parent 3ecd861 commit 7173004
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkg/changelog/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,11 @@ func (c *cli) printChangelog(highlightBytes []byte) {
if !ok {
log.Fatal().Str("kind", kind).Msg("missing kind")
}
fmt.Printf("\n### %s\n", ct.header)
prs := c.prsByKind[kind]
if len(prs) == 0 {
continue
}
fmt.Printf("\n### %s\n", ct.header)
for _, pr := range prs {
title := caser.String(pr.title)
title = strings.TrimSpace(title)
Expand Down

0 comments on commit 7173004

Please sign in to comment.