Skip to content

Commit d6455d3

Browse files
committed
Improve markdown checklist example in README
The example did not escape the markdown document correctly. Use an environment variable instead of direct string interpolation to consume the document safely in the github-script action. Closes #59
1 parent 5c7580c commit d6455d3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

README.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -361,11 +361,13 @@ jobs:
361361
- name: Create/update checklist as PR comment
362362
uses: actions/github-script@v6
363363
if: github.event_name == 'pull_request'
364+
env:
365+
REPORT: ${{ steps.slither.outputs.stdout }}
364366
with:
365367
script: |
366368
const script = require('.github/scripts/comment')
367369
const header = '# Slither report'
368-
const body = `${{ steps.slither.outputs.stdout }}`
370+
const body = process.env.REPORT
369371
await script({ github, context, header, body })
370372
```
371373

0 commit comments

Comments
 (0)