Update dist
This commit is contained in:
parent
65920a0bde
commit
59ca7fe3ad
|
@ -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,27 +921,25 @@ 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}`);
|
||||||
issueLogger.info(`Deleting the branch "${logger_service_1.LoggerService.cyan(branch)}" from closed $$type`);
|
return;
|
||||||
try {
|
}
|
||||||
this._consumeIssueOperation(issue);
|
issueLogger.info(`Deleting the branch "${logger_service_1.LoggerService.cyan(branch)}" from closed $$type`);
|
||||||
(_a = this.statistics) === null || _a === void 0 ? void 0 : _a.incrementDeletedBranchesCount();
|
try {
|
||||||
if (!this.options.debugOnly) {
|
this._consumeIssueOperation(issue);
|
||||||
yield this.client.rest.git.deleteRef({
|
(_b = this.statistics) === null || _b === void 0 ? void 0 : _b.incrementDeletedBranchesCount();
|
||||||
owner: github_1.context.repo.owner,
|
if (!this.options.debugOnly) {
|
||||||
repo: github_1.context.repo.repo,
|
yield this.client.rest.git.deleteRef({
|
||||||
ref: `heads/${branch}`
|
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}`);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
catch (error) {
|
||||||
issueLogger.warning(`Deleting the branch "${logger_service_1.LoggerService.cyan(branch)}" has skipped because it belongs to other repo ${pullRequest.head.repo.full_name}`);
|
issueLogger.error(`Error when deleting the branch "${logger_service_1.LoggerService.cyan(branch)}" from $$type: ${error.message}`);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue