ci(scripts): improve footer parsing trailing quote

This commit is contained in:
Elliot DeNolf
2024-05-06 13:53:24 -04:00
parent 892b884745
commit 9f37bf7397

View File

@@ -195,11 +195,17 @@ function formatCommitForChangelog(commit: GitCommit, includeBreakingNotes = fals
if (isBreaking && includeBreakingNotes) {
// Parse breaking change notes from commit body
const [rawNotes, _] = commit.body.split('\n\n')
const notes = rawNotes
let notes = rawNotes
.split('\n')
.map((l) => `> ${l}`)
.join('\n')
.trim()
// Remove random trailing quotes that sometimes appear
if (notes.endsWith('"')) {
notes = notes.slice(0, -1)
}
formatted += `\n\n${notes}\n\n`
}