Skip to content

Commit

Permalink
Merge pull request #74 from Omegapoint/error-log
Browse files Browse the repository at this point in the history
Error log
  • Loading branch information
hampus-andersson-op authored May 10, 2024
2 parents 5112d63 + ea24c79 commit cf67b51
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions src/branchprotection/BranchProtectionService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,19 @@ export class BranchProtectionService {
});
}
} else {
core.info('Failed to get branch protection');
core.notice(errorMessage, {
title: 'Branch protection control failed',
});
switch (errorMessage) {
case 'Upgrade to GitHub Pro or make this repository public to enable this feature.':
console.log('Branch protection is not enabled for repository:', repo);
core.exportVariable('numberOfReviewers', 0);
break;

default:
core.info('Failed to get branch protection');
core.notice(errorMessage, {
title: 'Branch protection control failed',
});
break;
}
}
}
console.log();
Expand Down

0 comments on commit cf67b51

Please sign in to comment.