mirror of
https://github.com/NeoCloud/NeoNetwork
synced 2024-11-22 08:50:39 +08:00
test-your-pr: fix bot comment: format error [skip ci]
Signed-off-by: Jerry <isjerryxiao@outlook.com>
This commit is contained in:
parent
e26309a2f6
commit
927756f36b
1 changed files with 3 additions and 2 deletions
5
.github/workflows/test-your-pr.yml
vendored
5
.github/workflows/test-your-pr.yml
vendored
|
@ -86,18 +86,19 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- shell: bash
|
- shell: bash
|
||||||
run: |
|
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
|
- uses: actions/github-script@v7
|
||||||
with:
|
with:
|
||||||
github-token: ${{secrets.COMMENT_GITHUB_TOKEN}}
|
github-token: ${{secrets.COMMENT_GITHUB_TOKEN}}
|
||||||
script: |
|
script: |
|
||||||
const fs = require('fs')
|
const fs = require('fs')
|
||||||
|
let l = fs.readFileSync('/tmp/buildjob_tail.log', { encoding: 'utf8', flag: 'r' }).replaceAll("```", "'''")
|
||||||
github.rest.issues.createComment({
|
github.rest.issues.createComment({
|
||||||
issue_number: context.issue.number,
|
issue_number: context.issue.number,
|
||||||
owner: context.repo.owner,
|
owner: context.repo.owner,
|
||||||
repo: context.repo.repo,
|
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
|
- run: false
|
||||||
|
|
Loading…
Reference in a new issue