- limit final pull requests based on the defined max_pull_requests count
This commit is contained in:
+6
@@ -1593,6 +1593,12 @@ function buildChangelog(diffInfo, prs, options) {
|
|||||||
core.warning(`⚠️ Configured \`duplicate_filter\` invalid.`);
|
core.warning(`⚠️ Configured \`duplicate_filter\` invalid.`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// limit the PRs to the `max_pull_requests`
|
||||||
|
const max_pull_requests = config.max_pull_requests || configuration_1.DefaultConfiguration.max_pull_requests;
|
||||||
|
if (prs.length > max_pull_requests) {
|
||||||
|
core.info(`ℹ️ Retrieved ${prs.length} PRs, limit count to: ${max_pull_requests} (max_pull_requests).`);
|
||||||
|
prs.length = Math.min(prs.length, max_pull_requests);
|
||||||
|
}
|
||||||
// extract additional labels from the commit message
|
// extract additional labels from the commit message
|
||||||
const labelExtractors = validateTransformers(config.label_extractor);
|
const labelExtractors = validateTransformers(config.label_extractor);
|
||||||
for (const extractor of labelExtractors) {
|
for (const extractor of labelExtractors) {
|
||||||
|
|||||||
+1
-1
File diff suppressed because one or more lines are too long
@@ -47,6 +47,13 @@ export function buildChangelog(diffInfo: DiffInfo, prs: PullRequestInfo[], optio
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// limit the PRs to the `max_pull_requests`
|
||||||
|
const max_pull_requests = config.max_pull_requests || DefaultConfiguration.max_pull_requests
|
||||||
|
if (prs.length > max_pull_requests) {
|
||||||
|
core.info(`ℹ️ Retrieved ${prs.length} PRs, limit count to: ${max_pull_requests} (max_pull_requests).`)
|
||||||
|
prs.length = Math.min(prs.length, max_pull_requests)
|
||||||
|
}
|
||||||
|
|
||||||
// extract additional labels from the commit message
|
// extract additional labels from the commit message
|
||||||
const labelExtractors = validateTransformers(config.label_extractor)
|
const labelExtractors = validateTransformers(config.label_extractor)
|
||||||
for (const extractor of labelExtractors) {
|
for (const extractor of labelExtractors) {
|
||||||
|
|||||||
Reference in New Issue
Block a user