From ec49b01dd05543e5be286fe6563edaa9e3326f20 Mon Sep 17 00:00:00 2001 From: Peter Evans <18365890+peter-evans@users.noreply.github.com> Date: Wed, 14 Apr 2021 17:54:43 +0900 Subject: [PATCH] fix: correct octokit method call --- dist/index.js | 2 +- src/github-helper.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dist/index.js b/dist/index.js index 90d878e..cbd050d 100644 --- a/dist/index.js +++ b/dist/index.js @@ -373,7 +373,7 @@ class GitHubHelper { } getDefaultBranch(repository) { return __awaiter(this, void 0, void 0, function* () { - const { data: repo } = yield this.octokit.repos.get(Object.assign({}, this.parseRepository(repository))); + const { data: repo } = yield this.octokit.rest.repos.get(Object.assign({}, this.parseRepository(repository))); return repo.default_branch; }); } diff --git a/src/github-helper.ts b/src/github-helper.ts index 7bdb545..96b6aea 100644 --- a/src/github-helper.ts +++ b/src/github-helper.ts @@ -196,7 +196,7 @@ export class GitHubHelper { } private async getDefaultBranch(repository: string): Promise { - const {data: repo} = await this.octokit.repos.get({ + const {data: repo} = await this.octokit.rest.repos.get({ ...this.parseRepository(repository) }) return repo.default_branch