- properly count categorized PRs

This commit is contained in:
Mike Penz
2020-10-19 18:03:50 +02:00
parent 4eaa60b4d5
commit 26cab8c692
3 changed files with 10 additions and 3 deletions
+4 -1
View File
@@ -45,6 +45,7 @@ export function buildChangelog(
for (const category of categories) {
categorized.set(category, [])
}
const categorizedPrs: string[] = []
const uncategorized: string[] = []
// bring elements in order
@@ -60,6 +61,8 @@ export function buildChangelog(
if (!matched) {
uncategorized.push(body)
} else {
categorizedPrs.push(body)
}
}
core.info(`️ Ordered all pull requests into ${categories.length} categories`)
@@ -102,7 +105,7 @@ export function buildChangelog(
// fill other placeholders
transformedChangelog = transformedChangelog.replace(
'${{CATEGORIZED_COUNT}}',
categorized.size.toString()
categorizedPrs.length.toString()
)
transformedChangelog = transformedChangelog.replace(
'${{UNCATEGORIZED_COUNT}}',