From 18057f039c41f922999895ce10b89212403c6d91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonathan=20Bokvad=20Engar=C3=A5s?= Date: Fri, 8 Sep 2023 09:38:46 +0200 Subject: [PATCH] Added logging --- src/Pentest/PentestService.ts | 14 +++++++++++ src/threatmodeling/ThreatModelingService.ts | 27 +++++++++------------ 2 files changed, 25 insertions(+), 16 deletions(-) diff --git a/src/Pentest/PentestService.ts b/src/Pentest/PentestService.ts index 7f7417a5..15304a8e 100644 --- a/src/Pentest/PentestService.ts +++ b/src/Pentest/PentestService.ts @@ -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, diff --git a/src/threatmodeling/ThreatModelingService.ts b/src/threatmodeling/ThreatModelingService.ts index a01f1f4d..d3cbe33c 100644 --- a/src/threatmodeling/ThreatModelingService.ts +++ b/src/threatmodeling/ThreatModelingService.ts @@ -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 { - 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 { + console.log('Running Threat Modeling Controls'); + if (!threatModelingDate.date || threatModelingDate.date === 'date-of-threat-modeling') { + core.warning('Threat Modeling Date is not set!'); + return; } -} \ No newline at end of file + core.setOutput('threatModelingDate', threatModelingDate.date); + + console.log('threatModelingDate is set', threatModelingDate.date); + } +}