Skip to content

Commit

Permalink
fix: fixed Comment on the pull request error (#1542)
Browse files Browse the repository at this point in the history
  • Loading branch information
Junjiequan authored Aug 1, 2024
1 parent 291f461 commit e899133
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/report-coverage.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Comment on the pull request

# see https://securitylab.github.com/research/github-actions-preventing-pwn-requests/
# see https://securitylab.github.com/research/github-actions-preventing-pwn-requests/
# read-write repo token
# access to secrets
on:
Expand All @@ -16,7 +16,7 @@ jobs:
github.event.workflow_run.event == 'pull_request' &&
github.event.workflow_run.conclusion == 'success'
steps:
- name: 'Download artifact'
- name: "Download artifact"
uses: actions/[email protected]
with:
script: |
Expand All @@ -28,7 +28,7 @@ jobs:
var matchArtifact = artifacts.data.artifacts.filter((artifact) => {
return artifact.name == "coverage"
})[0];
var download = await github.actions.downloadArtifact({
var download = await github.rest.actions.downloadArtifact({
owner: context.repo.owner,
repo: context.repo.repo,
artifact_id: matchArtifact.id,
Expand All @@ -37,18 +37,18 @@ jobs:
var fs = require('fs');
fs.writeFileSync('${{github.workspace}}/coverage.zip', Buffer.from(download.data));
- run: unzip pr.zip
- name: 'get PR number'
- name: "get PR number"
run: echo "pr_number=$(cat ./PR)">> $GITHUB_ENV

- name: report coverage
uses: Nef10/[email protected]
with:
lcov-file: lcov.info
pr-number: ${{ env.pr_number }}
pr-number: ${{ env.pr_number }}
github-token: ${{ secrets.GITHUB_TOKEN }}
output-file: comment.html
- name: Post code coverage report
uses: marocchino/[email protected]
with:
path: comment.html
number: ${{ env.pr_number }}
number: ${{ env.pr_number }}

0 comments on commit e899133

Please sign in to comment.