@@ -29,31 +29,22 @@ jobs:
2929 id : check_review
3030 shell : bash
3131 run : |
32- mkdir -p ${{ github.workspace }}/foo/bar/review-inline.txt
32+ mkdir -p ${{ github.workspace }}/foo/bar
3333 echo ">> This is a clean performance optimization" > ${{ github.workspace }}/foo/bar/review-inline.txt
3434 review_file=$(find ${{ github.workspace }} -name review-inline.txt)
3535 cat $review_file
3636 echo "review_file=$review_file" >> $GITHUB_OUTPUT
3737
38- - name : Comment on PR with review results
38+ - name : Comment on PR
3939 if : steps.check_review.outputs.review_file != ''
4040 uses : actions/github-script@v8
41+ env :
42+ REVIEW_FILE : ${{ steps.check_review.outputs.review_file }}
4143 with :
44+ github-token : ${{ steps.app-token.outputs.token }}
4245 script : |
43- const fs = require('fs');
44- const reviewContent = fs.readFileSync('${{ steps.check_review.outputs.review_file }}', 'utf8');
45- const jobSummaryUrl = `${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}`;
46- const commentBody = `Job summary: ${jobSummaryUrl}
47- Review contents :
48- \`\`\`
49- ${reviewContent}
50- \`\`\``;
51- github.rest.issues.createComment({
52- issue_number : context.issue.number,
53- owner : context.repo.owner,
54- repo : context.repo.repo,
55- body : commentBody
56- });
46+ const commentScript = require('./ci/claude/post-pr-comment.js');
47+ await commentScript({github, context});
5748
5849 - name : Fail job if review file exists
5950 if : steps.check_review.outputs.review_file != ''
0 commit comments