diff --git a/utils/scripts/generate-release-notes.js b/utils/scripts/generate-release-notes.js index cb0c7a4a8..8dcb6e61c 100644 --- a/utils/scripts/generate-release-notes.js +++ b/utils/scripts/generate-release-notes.js @@ -118,11 +118,15 @@ function categorizeCommits(commits, { mergeOnly, importantOnly }) { if (mergeOnly && !isMerge) continue; const type = - Object.keys(sections).find( - (k) => - msg.toLowerCase().startsWith(`${k}:`) || - msg.toLowerCase().startsWith(`${k} `), - ) || "other"; + Object.keys(sections).find((k) => { + const lowerMsg = msg.toLowerCase(); + return ( + lowerMsg.startsWith(`${k}:`) || + lowerMsg.startsWith(`${k} `) || + lowerMsg.startsWith(`${k}: `) || + lowerMsg.startsWith(`${k}(`) // handles e.g. 'feat(plugin-api): ...' + ); + }) || "other"; if ( importantOnly &&