From daf0b1343a83b6f5da1d50d4a2d5de0a5988ce1d Mon Sep 17 00:00:00 2001 From: dcvz Date: Thu, 1 Aug 2024 14:56:49 +0200 Subject: [PATCH] Fix gh api usage --- .github/workflows/update-pr-artifacts.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/update-pr-artifacts.yml b/.github/workflows/update-pr-artifacts.yml index 204269c..c00606f 100644 --- a/.github/workflows/update-pr-artifacts.yml +++ b/.github/workflows/update-pr-artifacts.yml @@ -13,12 +13,10 @@ jobs: - name: Get PR Number id: pr-number env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | # Get list of PR's associated to the commit that triggered the workflow run - prs=$(gh api \ - -H "Accept: application/vnd.github+json" \ - /repos/${{ github.event.pull_request.head.repo.full_name }}/commits/${{ github.event.workflow_run.head_sha }}/pulls) + prs=$(gh api -H "Accept: application/vnd.github+json" "/repos/${{ github.event.pull_request.head.repo.full_name }}/commits/${{ github.event.workflow_run.head_sha }}/pulls") # Find the PR against the current repo pr_number=$(echo "$prs" | jq -r '.[] | select(.base.repo.full_name == "${{ github.repository }}") | .number' | head -n1)