Update dist

This commit is contained in:
Sergey Dolin 2023-01-27 08:42:35 +01:00
parent 65920a0bde
commit 59ca7fe3ad
2 changed files with 50 additions and 9689 deletions

14
dist/index.js vendored
View File

@ -907,7 +907,7 @@ class IssuesProcessor {
} }
// Delete the branch on closed pull request // Delete the branch on closed pull request
_deleteBranch(issue) { _deleteBranch(issue) {
var _a; var _a, _b;
return __awaiter(this, void 0, void 0, function* () { return __awaiter(this, void 0, void 0, function* () {
const issueLogger = new issue_logger_1.IssueLogger(issue); const issueLogger = new issue_logger_1.IssueLogger(issue);
issueLogger.info(`Delete issueLogger.info(`Delete
@ -921,13 +921,15 @@ class IssuesProcessor {
return; return;
} }
const branch = pullRequest.head.ref; const branch = pullRequest.head.ref;
if (pullRequest.head.repo === null || if (((_a = pullRequest.head.repo) === null || _a === void 0 ? void 0 : _a.full_name) !==
pullRequest.head.repo.full_name ===
`${github_1.context.repo.owner}/${github_1.context.repo.repo}`) { `${github_1.context.repo.owner}/${github_1.context.repo.repo}`) {
issueLogger.warning(`Deleting the branch "${logger_service_1.LoggerService.cyan(branch)}" has skipped because it belongs to other repo ${pullRequest.head.repo.full_name}`);
return;
}
issueLogger.info(`Deleting the branch "${logger_service_1.LoggerService.cyan(branch)}" from closed $$type`); issueLogger.info(`Deleting the branch "${logger_service_1.LoggerService.cyan(branch)}" from closed $$type`);
try { try {
this._consumeIssueOperation(issue); this._consumeIssueOperation(issue);
(_a = this.statistics) === null || _a === void 0 ? void 0 : _a.incrementDeletedBranchesCount(); (_b = this.statistics) === null || _b === void 0 ? void 0 : _b.incrementDeletedBranchesCount();
if (!this.options.debugOnly) { if (!this.options.debugOnly) {
yield this.client.rest.git.deleteRef({ yield this.client.rest.git.deleteRef({
owner: github_1.context.repo.owner, owner: github_1.context.repo.owner,
@ -939,10 +941,6 @@ class IssuesProcessor {
catch (error) { catch (error) {
issueLogger.error(`Error when deleting the branch "${logger_service_1.LoggerService.cyan(branch)}" from $$type: ${error.message}`); issueLogger.error(`Error when deleting the branch "${logger_service_1.LoggerService.cyan(branch)}" from $$type: ${error.message}`);
} }
}
else {
issueLogger.warning(`Deleting the branch "${logger_service_1.LoggerService.cyan(branch)}" has skipped because it belongs to other repo ${pullRequest.head.repo.full_name}`);
}
}); });
} }
// Remove a label from an issue or a pull request // Remove a label from an issue or a pull request

9701
package-lock.json generated

File diff suppressed because it is too large Load Diff