-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: fixed Comment on the pull request error (#1542)
- Loading branch information
1 parent
291f461
commit e899133
Showing
1 changed file
with
7 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: | ||
|
@@ -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: | | ||
|
@@ -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, | ||
|
@@ -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 }} |