From d0e54839aaa56196d9609221e21fdef7fcbbc601 Mon Sep 17 00:00:00 2001 From: Nikhil Bhoski <47204011+nbhoski@users.noreply.github.com> Date: Thu, 13 Jun 2024 10:36:06 +0530 Subject: [PATCH] Added octokit parser --- src/buildSummary.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/buildSummary.ts b/src/buildSummary.ts index 90020ec..96fe9ea 100644 --- a/src/buildSummary.ts +++ b/src/buildSummary.ts @@ -81,8 +81,8 @@ export async function processAndDisplayBuildSummary() { } export function getWorkflowStepNames() { - const repository = process.env.GITHUB_REPOSITORY; - const [owner, repo] = repository.split('/'); + //const repository = process.env.GITHUB_REPOSITORY; + const [owner, repo] = process.env.GITHUB_REPOSITORY.split('/'); const runId = process.env.GITHUB_RUN_ID getWorkflowRunJobs(owner as string, repo as string, runId as string); } @@ -106,10 +106,10 @@ export async function getWorkflowRunJobs(owner: string, repo: string, runId: str // Iterate over the jobs and log the step names const jobs = response.data.jobs; jobs.forEach((job as string) => { - console.log(`Job: ${job.name}`) + console.log(`Job: ${job.name}`), job.steps.forEach((step as string) => { - console.log(` **Step: ${step.name}`) - console.log(` **Uses: ${step.uses}`) + console.log(` **Step: ${step.name}`), + console.log(` **Uses: ${step.uses}`), }); }); } catch (error) {