diff --git a/.github/workflows/test-pr-command.yml b/.github/workflows/test-pr-command.yml index 6911e7c6..87c671e9 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]