Skip to content

Commit

Permalink
Added logging
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanbokvad committed Sep 8, 2023
1 parent 12e35c2 commit 18057f0
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 16 deletions.
14 changes: 14 additions & 0 deletions src/Pentest/PentestService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,20 @@ export class PentestService {
console.log(`Repo: ${repo}`);

console.log('Going to get Pentest tickets from github boards');
await octokit.rest.projects
.listForRepo({
owner: owner,
repo: repo,
column_id: 24,
})
.then(async (response) => {
console.log('Got the column');
console.log(response.data);
})
.catch((error) => {
core.warning('Error getting column!');
console.log('Error: ', error);
});
await octokit.rest.projects
.listCards({
owner: owner,
Expand Down
27 changes: 11 additions & 16 deletions src/threatmodeling/ThreatModelingService.ts
Original file line number Diff line number Diff line change
@@ -1,20 +1,15 @@
import * as core from '@actions/core';
import * as github from '@actions/github';
export class ThreatModelingService{

public static async getStateOfThreatModeling(threatModelingDate: {
date: string;
boardsTag: string;
}): Promise<void> {
console.log('Running Threat Modeling Controls');

if(!threatModelingDate.date || threatModelingDate.date === "date-of-threat-modeling"){
core.warning("Threat Modeling Date is not set!");
return;
}
core.setOutput("threatModelingDate", threatModelingDate.date);

console.log("threatModelingDate is set", threatModelingDate.date);
export class ThreatModelingService {
public static async getStateOfThreatModeling(threatModelingDate: { date: string; boardsTag: string }): Promise<void> {
console.log('Running Threat Modeling Controls');

if (!threatModelingDate.date || threatModelingDate.date === 'date-of-threat-modeling') {
core.warning('Threat Modeling Date is not set!');
return;
}
}
core.setOutput('threatModelingDate', threatModelingDate.date);

console.log('threatModelingDate is set', threatModelingDate.date);
}
}

0 comments on commit 18057f0

Please sign in to comment.