Merge pull request #108 from peter-evans/fix-method

fix: correct octokit method call
This commit is contained in:
Peter Evans
2021-04-14 17:55:58 +09:00
committed by GitHub
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -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;
});
}
+1 -1
View File
@@ -196,7 +196,7 @@ export class GitHubHelper {
}
private async getDefaultBranch(repository: string): Promise<string> {
const {data: repo} = await this.octokit.repos.get({
const {data: repo} = await this.octokit.rest.repos.get({
...this.parseRepository(repository)
})
return repo.default_branch