Skip to content

Commit

Permalink
test-your-pr: fix bot comment: format error [skip ci]
Browse files Browse the repository at this point in the history
Signed-off-by: Jerry <[email protected]>
  • Loading branch information
isjerryxiao committed Dec 5, 2023
1 parent e26309a commit 927756f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/test-your-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,18 +86,19 @@ jobs:
steps:
- shell: bash
run: |
echo ${{needs.build.outputs.generate_roa}} | base64 -d | tail > /tmp/buildjob_tail.log || echo 'internal error' > /tmp/buildjob_tail.log
echo ${{needs.build.outputs.generate_roa}} | base64 -d | tail > /tmp/buildjob_tail.log || echo 'internal error' >> /tmp/buildjob_tail.log
- uses: actions/github-script@v7
with:
github-token: ${{secrets.COMMENT_GITHUB_TOKEN}}
script: |
const fs = require('fs')
let l = fs.readFileSync('/tmp/buildjob_tail.log', { encoding: 'utf8', flag: 'r' }).replaceAll("```", "'''")
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: fs.readFileSync('/tmp/buildjob_tail.log', { encoding: 'utf8', flag: 'r' })
body: `Your pull request failed the check:\`\`\`\n${l.trimEnd()}\n\`\`\``
})
- run: false

0 comments on commit 927756f

Please sign in to comment.