fix: update repo owner from GitHub API to match casing (#3410)

This commit is contained in:
Erez Rokah 2020-03-12 11:29:23 +01:00 committed by GitHub
parent 05a1c91a3c
commit c2e7a24dc2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -207,6 +207,8 @@ export default class API {
async hasWriteAccess() {
try {
const result: Octokit.ReposGetResponse = await this.request(this.repoURL);
// update config repoOwner to avoid case sensitivity issues with GitHub
this.repoOwner = result.owner.login;
return result.permissions.push;
} catch (error) {
console.error('Problem fetching repo data from GitHub');