ci(scripts): improve footer parsing trailing quote
This commit is contained in:
@@ -195,11 +195,17 @@ function formatCommitForChangelog(commit: GitCommit, includeBreakingNotes = fals
|
|||||||
if (isBreaking && includeBreakingNotes) {
|
if (isBreaking && includeBreakingNotes) {
|
||||||
// Parse breaking change notes from commit body
|
// Parse breaking change notes from commit body
|
||||||
const [rawNotes, _] = commit.body.split('\n\n')
|
const [rawNotes, _] = commit.body.split('\n\n')
|
||||||
const notes = rawNotes
|
let notes = rawNotes
|
||||||
.split('\n')
|
.split('\n')
|
||||||
.map((l) => `> ${l}`)
|
.map((l) => `> ${l}`)
|
||||||
.join('\n')
|
.join('\n')
|
||||||
.trim()
|
.trim()
|
||||||
|
|
||||||
|
// Remove random trailing quotes that sometimes appear
|
||||||
|
if (notes.endsWith('"')) {
|
||||||
|
notes = notes.slice(0, -1)
|
||||||
|
}
|
||||||
|
|
||||||
formatted += `\n\n${notes}\n\n`
|
formatted += `\n\n${notes}\n\n`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user