diff --git a/bin/buildChangelog.mjs b/bin/buildChangelog.mjs index 217b9372ce22..08a6b452504b 100644 --- a/bin/buildChangelog.mjs +++ b/bin/buildChangelog.mjs @@ -239,7 +239,9 @@ function convertStringToLog(logString) { // /(\w{40}) (\w{9,10}) (.*)/ // ); - const [hash, shortHash, title, body] = line.split(logDelimiter); + const [hash, shortHash, title, body] = line + .split(logDelimiter) + .map((s) => s.trim()); // console.log({ // hash, @@ -276,11 +278,12 @@ function convertStringToLog(logString) { type, scope, message, - usernames, + usernames: usernames || [], prs, - body, + body: body || "", }); } else { + console.log({ hash, shortHash, title, body }); console.warn("skipping line due to invalid format: " + line); } } @@ -362,6 +365,7 @@ async function main() { message: "add quotes in various languages", usernames: quoteAddCommits.map((item) => item.usernames).flat(), prs: quoteAddCommits.map((item) => item.prs).flat(), + body: "", }); } @@ -373,6 +377,7 @@ async function main() { message: "update or remove quotes reported by users", usernames: quoteReportCommits.map((item) => item.usernames).flat(), prs: quoteReportCommits.map((item) => item.prs).flat(), + body: "", }); }