diff --git a/git/script/makeReleaseNotes.ts b/git/script/makeReleaseNotes.ts index 1935823..4996a3e 100644 --- a/git/script/makeReleaseNotes.ts +++ b/git/script/makeReleaseNotes.ts @@ -90,8 +90,8 @@ function sortTypes( } function asListItem( - { type, scope, description, body, breakingChange, hash }: CommitInfo, - groupByType: boolean, + { type, scope, description, body, footers, breakingChange, hash }: CommitInfo, + groupByType?: boolean, ) { const typeAndScope = groupByType ? scope ? `(${scope})` : "" @@ -113,6 +113,14 @@ function asListItem( if (body) listItem += `\n\n${indent(body, 2).replace(/^ +$/mg, "")}`; + if (footers?.length) { + const footersSegment = footers + .map(({ key, value }) => `${key}: ${value}`) + .join("\n\n"); + + listItem += `\n\n${indent(footersSegment, 2).replace(/^ +$/mg, "")}`; + } + return listItem; }