- add ability to provide key for cateogry, used for json ('categorized') output

This commit is contained in:
Mike Penz
2023-05-25 17:59:11 +00:00
committed by GitHub
parent be9b53104e
commit 5d46efec54
5 changed files with 9 additions and 3 deletions
Generated Vendored
+1 -1
View File
@@ -1831,7 +1831,7 @@ function buildChangelog(diffInfo, prs, options) {
}
core.info(`️ Ordered all pull requests into ${categories.length} categories`);
// serialize and provide the categorized content as json
const transformedCategorized = Array.from(categorized).reduce((obj, [key, value]) => Object.assign(obj, { [key.title]: value }), {});
const transformedCategorized = Array.from(categorized).reduce((obj, [key, value]) => Object.assign(obj, { [key.key || key.title]: value }), {});
core.setOutput('categorized', JSON.stringify(transformedCategorized));
// construct final changelog
let changelog = '';