diff --git a/dist/index.js b/dist/index.js index c0de1d825..f8e3376b9 100644 --- a/dist/index.js +++ b/dist/index.js @@ -297,6 +297,10 @@ class IssuesProcessor { this._logger.info(`${logger_service_1.LoggerService.yellow('Processing the batch of issues')} ${logger_service_1.LoggerService.cyan(`#${page}`)} ${logger_service_1.LoggerService.yellow('containing')} ${logger_service_1.LoggerService.cyan(issues.length)} ${logger_service_1.LoggerService.yellow(`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: ${logger_service_1.LoggerService.cyan(issue.updated_at)}`); @@ -8866,4 +8870,4 @@ module.exports = require("zlib");; /******/ // Load entry module and return exports /******/ return __nccwpck_require__(3109); /******/ })() -; \ No newline at end of file +; diff --git a/src/classes/issues-processor.ts b/src/classes/issues-processor.ts index 0706ec7d6..f8066dd53 100644 --- a/src/classes/issues-processor.ts +++ b/src/classes/issues-processor.ts @@ -121,6 +121,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);