Skip to content

Commit 74e8431

Browse files
committed
Make sure commit messages are separated by newlines when building changelog
1 parent 8fa31c6 commit 74e8431

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bin/cm.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ function devserver(...args) {
150150
}
151151

152152
function changelog(pkg, since) {
153-
let commits = run("git", ["log", "--format=%B", "--reverse", since + "..main"], pkg.dir)
153+
let commits = run("git", ["log", "--format=%B%n", "--reverse", since + "..main"], pkg.dir)
154154
let result = {fix: [], feature: [], breaking: []}
155155
let re = /\n\r?\n(BREAKING|FIX|FEATURE):\s*([^]*?)(?=\r?\n\r?\n|\r?\n?$)/g, match
156156
while (match = re.exec(commits)) result[match[1].toLowerCase()].push(match[2].replace(/\r?\n/g, " "))

0 commit comments

Comments
 (0)