@@ -8331,8 +8331,8 @@ try {
83318331 if (event === "workflow_dispatch" || event === "schedule") {
83328332 _actions_core__WEBPACK_IMPORTED_MODULE_0__.info(`[!] Launched by ${event}`);
83338333 const label = "knowledge-base";
8334- const owner = "h0x0er ";
8335- const repo = "kb_setup ";
8334+ const owner = "step-security ";
8335+ const repo = "secure-workflows ";
83368336 let issues = [];
83378337 const resp = await client.rest.issues.listForRepo({ owner: owner, repo: repo, labels: label, state: "open", per_page: 100 });
83388338 const status = resp.status;
@@ -8528,8 +8528,8 @@ __webpack_handle_async_dependencies__();
85288528
85298529
85308530async function handleKBIssue(octokit, owner, repo, issue) {
8531- const storage_issue = 86 ;
8532- const comment_id = 1306827650; // TODO: change this id
8531+ const storage_issue = 1380 ;
8532+ const comment_id = 1308209074;
85338533 let comment = await prepareComment(octokit, owner, repo, issue);
85348534 _actions_core__WEBPACK_IMPORTED_MODULE_0__.info(`Analysis For ${issue}:\n ${comment}`);
85358535 let resp = await octokit.rest.issues.getComment({
@@ -8551,7 +8551,12 @@ async function handleKBIssue(octokit, owner, repo, issue) {
85518551 }
85528552 else {
85538553 _actions_core__WEBPACK_IMPORTED_MODULE_0__.info(`[!] Added ${issue.title} in tracking comment.`);
8554- let resp3 = await octokit.rest.issues.update({ owner: owner, repo: repo, issue_number: issue.number, state: "closed" });
8554+ let resp3 = await octokit.rest.issues.update({
8555+ owner: owner,
8556+ repo: repo,
8557+ issue_number: issue.number,
8558+ state: "closed",
8559+ });
85558560 if (resp3.status === 200) {
85568561 _actions_core__WEBPACK_IMPORTED_MODULE_0__.info(`[!] Closed Issue ${issue.number}`);
85578562 }
@@ -8566,7 +8571,7 @@ async function handleKBIssue(octokit, owner, repo, issue) {
85668571}
85678572function createIssueCommentBody(data) {
85688573 let output = [];
8569- output.push(`\n- [ ] ${data.title}`);
8574+ output.push(`\n- [ ] ${data.title.substring(5) }`);
85708575 let new_body = data.body.split("\n");
85718576 output.push(" <details>");
85728577 output.push(" <summary>Analysis</summary>\n");
@@ -8587,8 +8592,17 @@ async function prepareComment(client, owner, repo, issue) {
85878592 let body = resp.data[0].body;
85888593 return createIssueCommentBody({ title: issue.title, body: body });
85898594 }
8595+ else {
8596+ return createIssueCommentBody({
8597+ title: issue.title,
8598+ body: "no analysis found",
8599+ });
8600+ }
85908601 }
8591- return createIssueCommentBody({ title: issue.title, body: "no analysis" });
8602+ return createIssueCommentBody({
8603+ title: issue.title,
8604+ body: "unable to fetch analysis",
8605+ });
85928606}
85938607
85948608
0 commit comments