From f93d7a15fc58fde39412a463d36384f9ddb33792 Mon Sep 17 00:00:00 2001 From: Tim Jacomb Date: Wed, 16 Sep 2020 14:36:52 +0100 Subject: [PATCH] Condense if to else if --- .../src/scaffolder/stages/publish/github.ts | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/plugins/scaffolder-backend/src/scaffolder/stages/publish/github.ts b/plugins/scaffolder-backend/src/scaffolder/stages/publish/github.ts index b50d5730fb..ab1ffae80e 100644 --- a/plugins/scaffolder-backend/src/scaffolder/stages/publish/github.ts +++ b/plugins/scaffolder-backend/src/scaffolder/stages/publish/github.ts @@ -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;