Condense if to else if

This commit is contained in:
Tim Jacomb
2020-09-16 14:36:52 +01:00
parent 0c7acbe3cb
commit f93d7a15fc
@@ -64,16 +64,14 @@ export class GithubPublisher implements PublisherBase {
repo: name,
permission: 'admin',
});
} else {
// no need to add access if it's the person who own's the personal account
if (access && access !== owner) {
await this.client.repos.addCollaborator({
owner,
repo: name,
username: access,
permission: 'admin',
});
}
} else if (access && access !== owner) {
await this.client.repos.addCollaborator({
owner,
repo: name,
username: access,
permission: 'admin',
});
}
return data?.clone_url;