From 589e5370c9e0f58252a9c0a813dfab3c7e705638 Mon Sep 17 00:00:00 2001 From: Andrew Lee Date: Tue, 21 Nov 2023 17:42:53 -0800 Subject: [PATCH] Attempt to figure out ENV variable issue with workflows --- .github/workflows/CI.yml | 10 ++++++---- .github/workflows/scripts/reviewReviewed.js | 6 +++--- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 318a41d..f43ddc4 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -2,13 +2,15 @@ name: CI on: [pull_request] - + permissions: read-all jobs: - eslint: + eslint: + env: + REVIEWDOG_GITHUB_API_TOKEN: $${{ secret.sCTC_DEVOPS_ORG_PAT }} runs-on: ubuntu-latest - steps: + steps: - uses: actions/checkout@v2 - uses: actions/setup-node@v2 with: @@ -21,7 +23,7 @@ jobs: reporter: github-pr-review fail_on_error: false eslint_flags: '**/*.{js,jsx}' - + detect-secrets: runs-on: ubuntu-latest steps: diff --git a/.github/workflows/scripts/reviewReviewed.js b/.github/workflows/scripts/reviewReviewed.js index 9d83536..9dd2f44 100644 --- a/.github/workflows/scripts/reviewReviewed.js +++ b/.github/workflows/scripts/reviewReviewed.js @@ -40,11 +40,11 @@ const messageAssignee = async ({ context }) => { try { const UserModel = getUserModel(); const slackAssignees = await Promise.allSettled( - githubAssignees.map(assignee => UserModel.findOne({ github: assignee.login })), + githubAssignees.map((assignee) => UserModel.findOne({ github: assignee.login })), ); if (context.payload.review.state === 'approved') { await Promise.all( - slackAssignees.map(assignee => + slackAssignees.map((assignee) => Bot.client.chat.postMessage({ channel: assignee.value?.slackId, text: `One of your pull requests has been APPROVED by ${reviewer}! <${url}|View Review> :shrek::thumbsup:`, @@ -53,7 +53,7 @@ const messageAssignee = async ({ context }) => { ); } else { await Promise.all( - slackAssignees.map(assignee => + slackAssignees.map((assignee) => Bot.client.chat.postMessage({ channel: assignee.value?.slackId, text: `One of your pull requests has been REVIEWED by ${reviewer}! <${url}|View Review> :shrek:`,