Skip to content

Commit

Permalink
Print branch protection error
Browse files Browse the repository at this point in the history
  • Loading branch information
hampus-andersson-op committed Apr 22, 2024
1 parent af7b1cc commit fe54255
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/branchprotection/BranchProtectionService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ export class BranchProtectionService {
branch: 'main',
});

console.log(response);

if (response.data.enforce_admins?.enabled === false) {
core.warning('Branch protection can be overridden by admins and is therefore counted as not enabled');
}
Expand All @@ -41,6 +39,7 @@ export class BranchProtectionService {
title: 'Branch protection control failed',
});
} else if (error.status === 404) {
core.info(error);
// Status code '404' means 'Branch not protected'
core.notice('Branch protection is not enabled for this repository or credentials lack permissions', {
title: 'Branch protection control',
Expand Down

0 comments on commit fe54255

Please sign in to comment.