Skip to content

Commit

Permalink
Fix newlines in logs
Browse files Browse the repository at this point in the history
  • Loading branch information
hampus-andersson-op committed Apr 16, 2024
1 parent e6da399 commit e81898c
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 10 deletions.
3 changes: 1 addition & 2 deletions src/azuredevopsboard/AzureDevOpsBoardService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ export class AzureDevOpsBoardService {
if (cydigConfig.azureDevOps.boards) {
try {
console.log('--- Azure DevOps Boards control ---');

const azureDevOpsConnection: AzureDevOpsConnection = new AzureDevOpsConnection(
cydigConfig.azureDevOps.boards.organizationName,
core.getInput('accessTokenAzureDevOps')
Expand Down Expand Up @@ -47,7 +46,7 @@ export class AzureDevOpsBoardService {
core.warning('Error getting tickets for Azure DevOps Board!');
console.log('Error:', error.message);
}
console.log('');
console.log('\n');
}
}
}
2 changes: 1 addition & 1 deletion src/branchprotection/BranchProtectionService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,6 @@ export class BranchProtectionService {
core.warning(error.message);
}
}
console.log('');
console.log('\n');
}
}
2 changes: 1 addition & 1 deletion src/codequalitytools/CodeQualityService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ export class CodeQualityService {
console.log(`Tool:`, `${codeQualityTool.nameOfTool}`);
core.exportVariable('codeQualityTool', codeQualityTool.nameOfTool);
}
console.log('');
console.log('\n');
}
}
4 changes: 3 additions & 1 deletion src/pentest/PentestService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,16 @@ export class PentestService {
public static async getStateOfPentest(pentest: { date: string; boardsTag?: string }): Promise<void> {
console.log('--- Pentest control ---');
if (process.env.pentestDate) {
console.log('Pentest date was found');
core.exportVariable('pentestDate', process.env.pentestDate);
} else {
if (!pentest.date || pentest.date === 'date-of-pentest') {
core.warning('Pentest Date is not set!');
return;
}
console.log('Pentest date was found');
core.exportVariable('pentestDate', pentest.date);
}
console.log('');
console.log('\n');
}
}
2 changes: 1 addition & 1 deletion src/sasttools/SastService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ export class SastService {
if (sast.toLowerCase() === 'codeql') {
await CodeQLService.setCodeQLFindings();
}
console.log('');
console.log('\n');
}
}
2 changes: 1 addition & 1 deletion src/scatools/ScaService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ export class ScaService {
if (sca.toLowerCase() === 'dependabot') {
await DependabotService.setDependabotFindings();
}
console.log('');
console.log('\n');
}
}
2 changes: 1 addition & 1 deletion src/secretscanning/SecretScanningService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,6 @@ export class SecretScanningService {
core.warning(error.message);
core.exportVariable('numberOfExposedSecrets', 0);
}
console.log('');
console.log('\n');
}
}
6 changes: 4 additions & 2 deletions src/threatmodeling/ThreatModelingService.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
import * as core from '@actions/core';
export class ThreatModelingService {
public static async getStateOfThreatModeling(threatModeling: { date: string; boardsTag?: string }): Promise<void> {
console.log('--- Threat modeling control ---');
console.log('--- Threat Modeling control ---');
if (process.env.threatModelingDate) {
console.log('Threat Modeling date was found');
core.exportVariable('threatModelingDate', process.env.threatModelingDate);
} else {
if (!threatModeling.date || threatModeling.date === 'date-of-threat-modeling') {
core.warning('Threat Modeling Date is not set!');
return;
}
console.log('Threat Modeling date was found');
core.exportVariable('threatModelingDate', threatModeling.date);
}
console.log('');
console.log('\n');
}
}

0 comments on commit e81898c

Please sign in to comment.