From 62ed6cf073334da31b5dcf868d78df8cd77dd8f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonathan=20Bokvad=20Engar=C3=A5s?= <71070272+jonathanbokvad@users.noreply.github.com> Date: Fri, 13 Oct 2023 18:53:41 +0200 Subject: [PATCH] Update PentestService.ts --- src/Pentest/PentestService.ts | 105 ---------------------------------- 1 file changed, 105 deletions(-) diff --git a/src/Pentest/PentestService.ts b/src/Pentest/PentestService.ts index cec71ab2..7688a388 100644 --- a/src/Pentest/PentestService.ts +++ b/src/Pentest/PentestService.ts @@ -13,108 +13,3 @@ export class PentestService { } } } -//console.log('Pentest Date is set', pentestDate.date); - -// const token = core.getInput('repo-token'); -// console.log('Got the token'); - -// const octokit = github.getOctokit(token); -// console.log('octoKit authenticated'); - -// const { owner, repo } = github.context.repo; -// console.log(`Owner: ${owner}`); -// console.log(`Repo: ${repo}`); - -// console.log('Going to get Pentest tickets from github boards'); - -// await octokit.rest.projects -// .createForRepo({ -// owner: owner, -// repo: repo, -// name: 'Projects Jonathan B', -// }) -// .then(async (response) => { -// console.log('Got the column for repo'); -// console.log(response.data); -// }) -// .catch((error) => { -// core.warning('Error getting column!'); -// console.log('Error: ', error); -// }); -// await octokit.rest.projects -// .listForOrg({ -// org: owner, -// }) -// .then(async (response) => { -// console.log('Got the projects for org'); -// console.log(response.data); -// }) -// .catch((error) => { -// core.warning('Error getting projects for org!'); -// console.log('Error: ', error); -// }); - -// const customLabelIssues = await octokit.rest.issues -// .listForRepo({ -// owner: owner, -// repo: repo, -// }) -// .then(async (response) => { -// const issues = response.data; -// console.log('Got the issues'); -// console.log('Number of issues: ', issues.length); -// const customLabelIssues = issues.filter((issue) => { -// console.log('issue', issue.title); -// return issue.labels.some((label: any) => label.name === pentestDate.boardsTag); -// }); -// console.log('customLabelIssues', customLabelIssues.length); -// return customLabelIssues; -// }) -// .catch((error) => { -// core.warning('Error getting project for repo!'); -// console.log('Error: ', error); -// }); - -// await octokit.rest.projects -// .listCards({ -// owner: owner, -// repo: repo, -// column_id: 24, -// }) -// .then(async (response) => { -// console.log('Got the cards'); -// const projectCards = response.data; -// // const customLabelCards = projectCards.filter((card) => { -// // return card.note?.includes(pentestDate.boardsTag); -// // }); - -// const customLabelCards = []; -// console.log('projectCards', projectCards); -// for (const card of projectCards) { -// // Get the associated issue or pull request for the card -// console.log('card', card); -// const contentResponse = await octokit.request(card.content_url); -// console.log('contentResponse', contentResponse); -// if (contentResponse.data.labels.some((label: any) => label.name === pentestDate.boardsTag)) { -// customLabelCards.push(card); -// } -// } - -// console.log('customLabelCards', customLabelCards); -// return customLabelCards; -// }) -// .catch((error) => { -// core.warning('Error getting cards!'); -// console.log('Error: ', error); -// }); - -// owner: owner, -// repo: repo, -// branch: 'main', -// }).then((response) => { -// console.log("Got the branch protection"); -// console.log(response.data); -// }).catch((error) => { -// core.warning("Error getting branch protection!"); -// core.warning("Error: ", error.message); -// });