Skip to content

Commit

Permalink
refactor(pr): remove useless code
Browse files Browse the repository at this point in the history
  • Loading branch information
C0ZEN committed Sep 21, 2021
1 parent c3c7dca commit e790815
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 40 deletions.
19 changes: 0 additions & 19 deletions dist/index.js
Expand Up @@ -872,25 +872,6 @@ class IssuesProcessor {
}
});
}
_getPullRequest(issue) {
var _a;
return __awaiter(this, void 0, void 0, function* () {
const issueLogger = new issue_logger_1.IssueLogger(issue);
try {
this._consumeIssueQueryOperation(issue);
(_a = this._statistics) === null || _a === void 0 ? void 0 : _a.incrementFetchedPullRequestsCount();
const pullRequest = yield this.client.pulls.get({
owner: github_1.context.repo.owner,
repo: github_1.context.repo.repo,
pull_number: issue.number
});
return pullRequest.data;
}
catch (error) {
issueLogger.error(`Error when getting this $$type: ${error.message}`);
}
});
}
// Delete the branch on closed pull request
_deleteBranch(issue) {
var _a;
Expand Down
21 changes: 0 additions & 21 deletions src/classes/issues-processor.ts
Expand Up @@ -858,27 +858,6 @@ export class IssuesProcessor {
}
}

private async _getPullRequest(
issue: Issue
): Promise<IPullRequest | undefined | void> {
const issueLogger: IssueLogger = new IssueLogger(issue);

try {
this._consumeIssueQueryOperation(issue);
this._statistics?.incrementFetchedPullRequestsCount();

const pullRequest = await this.client.pulls.get({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: issue.number
});

return pullRequest.data;
} catch (error) {
issueLogger.error(`Error when getting this $$type: ${error.message}`);
}
}

// Delete the branch on closed pull request
private async _deleteBranch(issue: Issue): Promise<void> {
const issueLogger: IssueLogger = new IssueLogger(issue);
Expand Down

0 comments on commit e790815

Please sign in to comment.