Skip to content

Commit

Permalink
More log testing
Browse files Browse the repository at this point in the history
  • Loading branch information
hampus-andersson-op committed Apr 18, 2024
1 parent 4b074f6 commit 03333a3
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
1 change: 1 addition & 0 deletions src/branchprotection/BranchProtectionService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ export class BranchProtectionService {

core.exportVariable('numberOfReviewers', numberOfReviewers);
} catch (error) {
core.info('Failed to get branch protection');
if (error.status === 401) {
core.warning(error.message, {
title: 'Branch protection control failed',
Expand Down
6 changes: 4 additions & 2 deletions src/sasttools/CodeQLService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,10 @@ export class CodeQLService {
core.exportVariable('SASTnumberOfSeverity3', sastNumberOfSeverity3);
core.exportVariable('SASTnumberOfSeverity4', sastNumberOfSeverity4);
} catch (error) {
core.warning('Failed to get CodeQL severities');
core.warning(error.message);
core.info('Failed to get CodeQL severities');
core.warning(error.message, {
title: 'SAST tool control failed',
});
core.exportVariable('SASTnumberOfSeverity1', 0);
core.exportVariable('SASTnumberOfSeverity2', 0);
core.exportVariable('SASTnumberOfSeverity3', 0);
Expand Down
6 changes: 4 additions & 2 deletions src/scatools/DependabotService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,10 @@ export class DependabotService {
core.exportVariable('SCAnumberOfSeverity3', scaNumberOfSeverity3);
core.exportVariable('SCAnumberOfSeverity4', scaNumberOfSeverity4);
} catch (error) {
core.warning('Failed to get Dependabot severities');
core.warning(error.message);
core.info('Failed to get Dependabot severities');
core.warning(error.message, {
title: 'SCA tool control failed',
});
core.exportVariable('SCAnumberOfSeverity1', 0);
core.exportVariable('SCAnumberOfSeverity2', 0);
core.exportVariable('SCAnumberOfSeverity3', 0);
Expand Down
1 change: 1 addition & 0 deletions src/secretscanning/SecretScanningService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ export class SecretScanningService {
console.log('Exposed secrets:', numberOfExposedSecrets);
core.exportVariable('numberOfExposedSecrets', numberOfExposedSecrets);
} catch (error) {
core.info('Failed to get number of exposed secrets');
if (error.status === 401 || error.status === 404) {
core.warning(error.message, {
title: 'Number of exposed secrets control failed',
Expand Down

0 comments on commit 03333a3

Please sign in to comment.