Skip to content

Commit

Permalink
🐛 Hide changelog sections without commits
Browse files Browse the repository at this point in the history
  • Loading branch information
priestine committed Jul 8, 2020
1 parent 0960b38 commit 40da5a4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/pure/make-changelog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,10 @@ const getChangelogOfType = (
convention.match.some((match) => new RegExp(match).test(commit.type)),
),
).map((commits) =>
[convention.groupTitleFormat, convention.groupDescription]
[
commits.length > 0 ? convention.groupTitleFormat : '',
commits.length > 0 ? convention.groupDescription : '',
]
.filter(Boolean)
.concat(commits.map(prettifyCommit(convention))),
),
Expand Down

0 comments on commit 40da5a4

Please sign in to comment.