diff --git a/dist/index.js b/dist/index.js index 6abefe920..316ec729c 100644 --- a/dist/index.js +++ b/dist/index.js @@ -300,6 +300,10 @@ class IssuesProcessor { this._logger.info(chalk_1.default.yellow(`Processing the batch of issues ${chalk_1.default.cyan(`#${page}`)} containing ${chalk_1.default.cyan(issues.length)} issue${issues.length > 1 ? 's' : ''}...`)); } for (const issue of issues.values()) { + // Stop the processing if no more operations remains + if (!this._operations.hasRemainingOperations()) { + break; + } const issueLogger = new issue_logger_1.IssueLogger(issue); (_b = this._statistics) === null || _b === void 0 ? void 0 : _b.incrementProcessedItemsCount(issue); issueLogger.info(`Found this $$type last updated at: ${chalk_1.default.cyan(issue.updated_at)}`); diff --git a/src/classes/issues-processor.ts b/src/classes/issues-processor.ts index 6c951bab4..0c7950e95 100644 --- a/src/classes/issues-processor.ts +++ b/src/classes/issues-processor.ts @@ -117,6 +117,11 @@ export class IssuesProcessor { } for (const issue of issues.values()) { + // Stop the processing if no more operations remains + if (!this.operations.hasRemainingOperations()) { + break; + } + const issueLogger: IssueLogger = new IssueLogger(issue); this._statistics?.incrementProcessedItemsCount(issue);