From d124001224e84bda44d3ed1474f9c0cf46ecd038 Mon Sep 17 00:00:00 2001 From: Nikhil Bhoski <47204011+nbhoski@users.noreply.github.com> Date: Thu, 13 Jun 2024 12:28:45 +0530 Subject: [PATCH] Added octokit parser --- .github/workflows/bat.yml | 2 ++ src/buildSummary.ts | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/bat.yml b/.github/workflows/bat.yml index d42f94d..ce7ac80 100644 --- a/.github/workflows/bat.yml +++ b/.github/workflows/bat.yml @@ -54,6 +54,8 @@ jobs: _EOF - name: Run build with default tasks + env: + MY_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} uses: ./ - name: Run build with specified task diff --git a/src/buildSummary.ts b/src/buildSummary.ts index b70fcce..6737ce4 100644 --- a/src/buildSummary.ts +++ b/src/buildSummary.ts @@ -75,7 +75,7 @@ export async function processAndDisplayBuildSummary() { const data = await readJsonFile(filePath); const taskSummaryTableRows = getBuildSummaryTable(data); writeSummary(taskSummaryTableRows); - console.log(process.env.GITHUB_TOKEN); + console.log(process.env.MY_GITHUB_TOKEN); getWorkflowStepNames(repository as string); } catch (error) { console.error('An error occurred while reading the build summary file or adding the build summary table:', error); @@ -96,7 +96,7 @@ export async function getWorkflowRunJobs(owner: string, repo: string, runId: str // Replace with your GitHub personal access token const octokit = new Octokit({ - auth: process.env.GITHUB_TOKEN, + auth: process.env.MY_GITHUB_TOKEN, }); try { // Fetch the jobs for the specified workflow run