diff --git a/src/Pentest/PentestService.ts b/src/Pentest/PentestService.ts index 8c5e9380..5971001f 100644 --- a/src/Pentest/PentestService.ts +++ b/src/Pentest/PentestService.ts @@ -13,17 +13,17 @@ export class PentestService { console.log('Pentest Date is set', pentestDate.date); - const token = core.getInput('repo-token'); - console.log('Got the token'); + // const token = core.getInput('repo-token'); + // console.log('Got the token'); - const octokit = github.getOctokit(token); - console.log('octoKit authenticated'); + // const octokit = github.getOctokit(token); + // console.log('octoKit authenticated'); - const { owner, repo } = github.context.repo; - console.log(`Owner: ${owner}`); - console.log(`Repo: ${repo}`); + // const { owner, repo } = github.context.repo; + // console.log(`Owner: ${owner}`); + // console.log(`Repo: ${repo}`); - console.log('Going to get Pentest tickets from github boards'); + // console.log('Going to get Pentest tickets from github boards'); // await octokit.rest.projects // .createForRepo({ @@ -39,39 +39,39 @@ export class PentestService { // 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); - }); + // 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); - }); + // 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({