Skip to content

Commit 6343f29

Browse files
update comment post
1 parent 91f33c6 commit 6343f29

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

.github/workflows/sftp-benchmark.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -155,15 +155,18 @@ jobs:
155155
- name: Comment on PR about performance
156156
env:
157157
GH_TOKEN: ${{ github.token }}
158+
PR_NUMBER: ${{ github.event.pull_request.number }}
158159
run: |
159-
ARTIFACT_URL=$(gh api repos/${{ github.repository }}/actions/artifacts \
160-
--jq '.artifacts[0].archive_download_url')
160+
# Get the artifact URL
161+
ARTIFACT_ID=$(gh api repos/${{ github.repository }}/actions/artifacts \
162+
--jq '.artifacts[0].id')
161163
164+
# Create the comment with direct link to download
162165
curl -X POST \
163-
-H "Authorization: token ${{ github.token }}" \
166+
-H "Authorization: Bearer ${{ github.token }}" \
164167
-H "Accept: application/vnd.github.v3+json" \
165-
"https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/comments" \
166-
-d "{\"body\":\"Graphs available in [workflow artifacts]($ARTIFACT_URL)\"}"
168+
"https://api.github.com/repos/${{ github.repository }}/pulls/$PR_NUMBER/comments" \
169+
-d "{\"body\":\"Graphs have been generated and are available in the [workflow artifacts](https://github.com/${{ github.repository }}/actions/artifacts/$ARTIFACT_ID)\"}"
167170
168171
- name: Print logs if failed
169172
working-directory: ./wolfssh/

0 commit comments

Comments
 (0)