From 9d484a57be13f0677a9b01836b9848bfd9de90a1 Mon Sep 17 00:00:00 2001 From: mando <88534959+kssumin@users.noreply.github.com> Date: Thu, 22 Aug 2024 14:17:08 +0900 Subject: [PATCH] =?UTF-8?q?fix=20:=20secret=20json=ED=98=95=EC=8B=9D?= =?UTF-8?q?=EC=9C=BC=EB=A1=9C=20=EB=B3=80=ED=99=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/pr-notification.yml | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/.github/workflows/pr-notification.yml b/.github/workflows/pr-notification.yml index 62993eaf..c8d1c427 100644 --- a/.github/workflows/pr-notification.yml +++ b/.github/workflows/pr-notification.yml @@ -2,10 +2,8 @@ name: PR Slack Notification on: pull_request: types: [opened, reopened] - permissions: pull-requests: read - jobs: notify_reviewers: runs-on: ubuntu-latest @@ -20,12 +18,11 @@ jobs: echo "Error: SLACK_IDS is not set" exit 1 fi - - name: Set environment variables run: | echo "SLACK_WEBHOOK_URL=${{ secrets.SLACK_PR_CREATE_WEBHOOK_URL }}" >> $GITHUB_ENV - echo "SLACK_IDS=${{ secrets.SLACK_IDS }}" >> $GITHUB_ENV - + echo 'SLACK_IDS=${{ toJson(secrets.SLACK_IDS) }}' >> $GITHUB_ENV + shell: bash - name: Send Slack notification for new PR run: | PR_TITLE="${{ github.event.pull_request.title }}" @@ -40,10 +37,6 @@ jobs: echo "Reviewers: $REVIEWERS" parse_slack_ids() { - if ! echo "$SLACK_IDS" | jq empty; then - echo "Error: Invalid JSON in SLACK_IDS" >&2 - exit 1 - fi echo "$SLACK_IDS" | jq -r 'to_entries | map("\(.key):\(.value)") | .[]' }