Skip to content

Commit

Permalink
Update PentestService.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanbokvad authored Oct 13, 2023
1 parent 91f4a14 commit 62ed6cf
Showing 1 changed file with 0 additions and 105 deletions.
105 changes: 0 additions & 105 deletions src/Pentest/PentestService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
// });

0 comments on commit 62ed6cf

Please sign in to comment.