From 80a2bdc0be043a5c9578b3348aef4773a8509cbd Mon Sep 17 00:00:00 2001 From: Tejas Kumar Date: Wed, 19 May 2021 07:31:52 +0200 Subject: [PATCH] Use a literal for branch name Signed-off-by: Tejas Kumar --- .../src/scaffolder/stages/publish/helpers.ts | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/plugins/scaffolder-backend/src/scaffolder/stages/publish/helpers.ts b/plugins/scaffolder-backend/src/scaffolder/stages/publish/helpers.ts index fce3ca67da..f1ad9617ce 100644 --- a/plugins/scaffolder-backend/src/scaffolder/stages/publish/helpers.ts +++ b/plugins/scaffolder-backend/src/scaffolder/stages/publish/helpers.ts @@ -82,11 +82,6 @@ export const enableBranchProtectionOnDefaultRepoBranch = async ({ owner, isRetry = false, }: BranchProtectionOptions): Promise => { - const { data: repo } = await client.repos.get({ - owner, - repo: repoName, - }); - try { await client.repos.updateBranchProtection({ mediaType: { @@ -101,7 +96,7 @@ export const enableBranchProtectionOnDefaultRepoBranch = async ({ }, owner, repo: repoName, - branch: repo.default_branch, + branch: 'master', required_status_checks: { strict: true, contexts: [] }, restrictions: null, enforce_admins: true,