Build dist

This commit is contained in:
Sergey Dolin 2023-01-24 07:40:40 +00:00
parent dad3c0f9e0
commit c933d5be9d
1 changed files with 1316 additions and 1309 deletions

31
dist/index.js vendored
View File

@ -917,20 +917,27 @@ class IssuesProcessor {
return; return;
} }
const branch = pullRequest.head.ref; const branch = pullRequest.head.ref;
issueLogger.info(`Deleting the branch "${logger_service_1.LoggerService.cyan(branch)}" from closed $$type`); if (pullRequest.head.repo === null ||
try { pullRequest.head.repo.full_name ===
this._consumeIssueOperation(issue); `${github_1.context.repo.owner}/${github_1.context.repo.repo}`) {
(_a = this.statistics) === null || _a === void 0 ? void 0 : _a.incrementDeletedBranchesCount(); issueLogger.info(`Deleting the branch "${logger_service_1.LoggerService.cyan(branch)}" from closed $$type`);
if (!this.options.debugOnly) { try {
yield this.client.rest.git.deleteRef({ this._consumeIssueOperation(issue);
owner: github_1.context.repo.owner, (_a = this.statistics) === null || _a === void 0 ? void 0 : _a.incrementDeletedBranchesCount();
repo: github_1.context.repo.repo, if (!this.options.debugOnly) {
ref: `heads/${branch}` yield this.client.rest.git.deleteRef({
}); owner: github_1.context.repo.owner,
repo: github_1.context.repo.repo,
ref: `heads/${branch}`
});
}
}
catch (error) {
issueLogger.error(`Error when deleting the branch "${logger_service_1.LoggerService.cyan(branch)}" from $$type: ${error.message}`);
} }
} }
catch (error) { else {
issueLogger.error(`Error when deleting the branch "${logger_service_1.LoggerService.cyan(branch)}" from $$type: ${error.message}`); issueLogger.warning(`Deleting the branch "${logger_service_1.LoggerService.cyan(branch)}" has skipped because it belongs to other repo ${pullRequest.head.repo.full_name}`);
} }
}); });
} }