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