- fix bailing out if the max amount of PRs is reached

This commit is contained in:
Mike Penz
2023-08-25 07:54:34 +00:00
committed by GitHub
parent bfac64bcd3
commit ae2c6ccbb5
3 changed files with 7 additions and 5 deletions
Generated Vendored
+3 -2
View File
@@ -842,7 +842,8 @@ class PullRequests {
mergedPRs.push(mapPullRequest(pr, 'merged'));
}
if (mergedPRs.length >= maxPullRequests) {
core.warning(`⚠️ Reached 'maxPullRequests' count ${maxPullRequests}`);
core.warning(`⚠️ Reached 'maxPullRequests' count ${maxPullRequests} (1)`);
break; // bail out early to not keep iterating forever
}
else if (prs.length > 0) {
if (fetchedEnough(prs, fromDate)) {
@@ -889,7 +890,7 @@ class PullRequests {
const firstPR = prs[0];
if (firstPR === undefined || openPrs.length >= maxPullRequests) {
if (openPrs.length >= maxPullRequests) {
core.warning(`⚠️ Reached 'maxPullRequests' count ${maxPullRequests}`);
core.warning(`⚠️ Reached 'maxPullRequests' count ${maxPullRequests} (2)`);
}
break; // bail out early to not keep iterating forever
}
Generated Vendored
+1 -1
View File
File diff suppressed because one or more lines are too long