- adjust external contributor logic to filter out repo owner

This commit is contained in:
Mike Penz
2024-11-02 10:48:43 +01:00
parent ac686fc38f
commit a7d84578bd
4 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -21,7 +21,7 @@
"labels": ["dependencies"] "labels": ["dependencies"]
} }
], ],
"template": "${{CHANGELOG}}\n\nContributors:\n${{CONTRIBUTORS}}", "template": "#{{CHANGELOG}}\n\nContributors:\n- #{{CONTRIBUTORS}}",
"max_pull_requests": 1000, "max_pull_requests": 1000,
"max_back_track_time_days": 1000 "max_back_track_time_days": 1000
} }
Generated Vendored
+1 -1
View File
@@ -2707,7 +2707,7 @@ function buildChangelog(diffInfo, origPrs, options) {
const contributorsSet = new Set(prs.map(pr => `@${pr.author}`)); const contributorsSet = new Set(prs.map(pr => `@${pr.author}`));
const contributorsArray = Array.from(contributorsSet); const contributorsArray = Array.from(contributorsSet);
const contributorsString = contributorsArray.join(', '); const contributorsString = contributorsArray.join(', ');
const externalContributorString = contributorsArray.filter(value => value !== options.owner).join(', '); const externalContributorString = contributorsArray.filter(value => value !== `@${options.owner}`).join(', ');
core.setOutput('contributors', JSON.stringify(contributorsSet)); core.setOutput('contributors', JSON.stringify(contributorsSet));
const releaseNotesTemplateContext = buildReleaseNotesTemplateContext(changelogStrings, contributorsString, externalContributorString, prStrings, diffInfo, options); const releaseNotesTemplateContext = buildReleaseNotesTemplateContext(changelogStrings, contributorsString, externalContributorString, prStrings, diffInfo, options);
let renderedReleaseNotesTemplate = renderTemplateAndFillPlaceholderContext(config.template, releaseNotesTemplateContext, groupedPlaceholders, customPlaceholdersTemplateContext, config); let renderedReleaseNotesTemplate = renderTemplateAndFillPlaceholderContext(config.template, releaseNotesTemplateContext, groupedPlaceholders, customPlaceholdersTemplateContext, config);
Generated Vendored
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -178,7 +178,7 @@ export function buildChangelog(diffInfo: DiffInfo, origPrs: PullRequestInfo[], o
const contributorsSet: Set<string> = new Set(prs.map(pr => `@${pr.author}`)) const contributorsSet: Set<string> = new Set(prs.map(pr => `@${pr.author}`))
const contributorsArray = Array.from(contributorsSet) const contributorsArray = Array.from(contributorsSet)
const contributorsString = contributorsArray.join(', ') const contributorsString = contributorsArray.join(', ')
const externalContributorString = contributorsArray.filter(value => value !== options.owner).join(', ') const externalContributorString = contributorsArray.filter(value => value !== `@${options.owner}`).join(', ')
core.setOutput('contributors', JSON.stringify(contributorsSet)) core.setOutput('contributors', JSON.stringify(contributorsSet))
const releaseNotesTemplateContext = buildReleaseNotesTemplateContext( const releaseNotesTemplateContext = buildReleaseNotesTemplateContext(