From 0ea7e43d67b84cdaee0b9279848a544d637e2b46 Mon Sep 17 00:00:00 2001 From: "Aaron (\"AJ\") Steers" Date: Sat, 9 Nov 2024 19:37:16 -0800 Subject: [PATCH] Apply suggestions from code review Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --- .github/workflows/test-pr-command.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test-pr-command.yml b/.github/workflows/test-pr-command.yml index 6911e7c62..87c671e9d 100644 --- a/.github/workflows/test-pr-command.yml +++ b/.github/workflows/test-pr-command.yml @@ -22,10 +22,10 @@ jobs: env: GH_TOKEN: ${{ github.token }} run: | - PR_JSON=$(gh api repos/${{ github.repository }}/pulls/${{ github.event.inputs.pr }}) + PR_JSON=$(gh api "repos/${{ github.repository }}/pulls/${{ github.event.inputs.pr }}") echo "$PR_JSON" > pr-info.json - echo "sha=$(cat pr-info.json | jq -r .head.sha)" >> $GITHUB_OUTPUT - echo "run-url=https://github.com/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID" >> $GITHUB_OUTPUT + echo "sha=$(jq -r .head.sha < pr-info.json)" >> "$GITHUB_OUTPUT" + echo "run-url=https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" >> "$GITHUB_OUTPUT" - name: Upload PR details as artifact uses: actions/upload-artifact@v4 with: @@ -120,7 +120,7 @@ jobs: - name: Post CI Success to GitHub run: | curl --request POST \ - --url https://api.github.com/repos/${{ github.repository }}/statuses/$(cat pr-info.json | jq -r .head.sha) \ + --url "https://api.github.com/repos/${{ github.repository }}/statuses/$(jq -r .head.sha < pr-info.json)" \ --header 'authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' \ --header 'content-type: application/json' \ --data '{ @@ -128,7 +128,6 @@ jobs: "context": "Pytest (All, Python ${{ matrix.python-version }}, ${{ matrix.os }})", "target_url": "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}", }' \ - log-success-comment: name: Append 'Success' Comment needs: [pytest-on-demand]