Merge pull request #108 from peter-evans/fix-method
fix: correct octokit method call
This commit is contained in:
Vendored
+1
-1
@@ -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;
|
||||
});
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user