- introduce minimalistic CONTRIBUTORS output for changelogs

- This is based only on PR authors at this time
  - RELATES TO https://github.com/mikepenz/release-changelog-builder-action/pull/1338
  - Thanks @Freezor
This commit is contained in:
Mike Penz
2024-06-20 11:46:23 +02:00
parent 67e423e289
commit 28b9afa1d6
5 changed files with 46 additions and 25 deletions
Generated Vendored
+9
View File
@@ -2786,12 +2786,21 @@ function buildChangelog(diffInfo, origPrs, options) {
}
}
core.info(`✒️ Wrote ${ignoredPrs.length} ignored pull requests down`);
// collect all contributors
let contributors = [];
for (const pr of prs) {
contributors = contributors.concat(pr.author);
}
const contributorsString = contributors.join(', ');
core.setOutput('contributors', JSON.stringify(contributors));
// fill template
const placeholderMap = new Map();
placeholderMap.set('CHANGELOG', changelog);
placeholderMap.set('UNCATEGORIZED', changelogUncategorized);
placeholderMap.set('OPEN', changelogOpen);
placeholderMap.set('IGNORED', changelogIgnored);
// fill special collected contributors
placeholderMap.set('CONTRIBUTORS', contributorsString);
// fill other placeholders
placeholderMap.set('CATEGORIZED_COUNT', categorizedPrs.length.toString());
placeholderMap.set('UNCATEGORIZED_COUNT', uncategorizedPrs.length.toString());