@@ -62,17 +62,17 @@ and upload the generated data as an artifact. See the snippet below for the rele
62
62
with:
63
63
script: |
64
64
const fs = require('fs');
65
- const COVERAGE_PERCENTAGE = ` ${{ env.COVERAGE_PERCENTAGE }} ` ;
66
- const COVERAGE_REPORT_PATH = ` https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}/ ` ;
65
+ const COVERAGE_PERCENTAGE = ` \ ${{ env.COVERAGE_PERCENTAGE }}` ;
66
+ const COVERAGE_REPORT_PATH = ` https://github.com/${{ github.repository }}/actions/runs/\ ${{ github.run_id }}/ ` ;
67
67
68
68
fs.mkdirSync('./pr-comment', { recursive: true });
69
69
70
- var pr_number = ` ${{ github.event.number }} ` ;
70
+ var pr_number = ` \ ${{ github.event.number }}` ;
71
71
var body = `
72
72
Code coverage report is ready! :chart_with_upwards_trend :
73
73
74
- - ** Code Coverage Percentage:** ${COVERAGE_PERCENTAGE}%
75
- - ** Code Coverage Report:** [ View Coverage Report] ( ${COVERAGE_REPORT_PATH} )
74
+ - ** Code Coverage Percentage:** \ $ {COVERAGE_PERCENTAGE}%
75
+ - ** Code Coverage Report:** [ View Coverage Report] ( \ $ {COVERAGE_REPORT_PATH})
76
76
`;
77
77
78
78
fs.writeFileSync('./pr-comment/pr-number.txt', pr_number);
@@ -118,7 +118,7 @@ jobs:
118
118
var artifacts = await github.rest.actions.listWorkflowRunArtifacts({
119
119
owner: context.repo.owner,
120
120
repo: context.repo.repo,
121
- run_id: ${{github.event.workflow_run.id }},
121
+ run_id: \ $ {{github.event.workflow_run.id }},
122
122
});
123
123
var matchArtifact = artifacts.data.artifacts.filter((artifact) => {
124
124
return artifact.name == "pr-comment"
@@ -130,12 +130,12 @@ jobs:
130
130
archive_format: 'zip',
131
131
});
132
132
var fs = require('fs');
133
- fs.writeFileSync('${{github.workspace}}/pr-comment.zip', Buffer.from(download.data));
133
+ fs.writeFileSync('\ $ {{github.workspace}}/pr-comment.zip', Buffer.from(download.data));
134
134
- run: unzip pr-comment.zip
135
135
- name: 'Comment on PR'
136
136
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
137
137
with:
138
- github-token: ${{ secrets.GITHUB_TOKEN }}
138
+ github-token: \ $ {{ secrets.GITHUB_TOKEN }}
139
139
script: |
140
140
var fs = require('fs');
141
141
0 commit comments