From 9220232047f3fc16c4e4e09ff56edf279f3368a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonathan=20Bokvad=20Engar=C3=A5s?= Date: Tue, 3 Oct 2023 09:25:35 +0200 Subject: [PATCH] refactor project --- src/branchprotection/BranchProtectionService.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/branchprotection/BranchProtectionService.ts b/src/branchprotection/BranchProtectionService.ts index 43ee288d..15527809 100644 --- a/src/branchprotection/BranchProtectionService.ts +++ b/src/branchprotection/BranchProtectionService.ts @@ -33,9 +33,11 @@ export class BranchProtectionService { core.exportVariable('numberOfReviewers', numberOfReviewers); } catch (error) { - console.log('error', error); core.warning('Error getting branch protection!'); console.log('Error:', error.message); + if (error.status === 403) { + core.exportVariable('numberOfReviewers', 0); + } } } }