Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
  • Loading branch information
aaronsteers and coderabbitai[bot] authored Nov 10, 2024
1 parent dcd1fd6 commit 0ea7e43
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions .github/workflows/test-pr-command.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -120,15 +120,14 @@ 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 '{
"state": "success",
"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]
Expand Down

0 comments on commit 0ea7e43

Please sign in to comment.