File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -271,13 +271,21 @@ jobs:
271271 if : always()
272272 run : cat target/diff-cover/report.md >> $GITHUB_STEP_SUMMARY
273273
274- - name : Comment
274+ - name : Generate comment
275+ id : generate_comment
275276 if : always()
276277 env :
277- GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
278278 RUN_URL : ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
279279 run : |
280- $COVERAGE_SCRIPT comment_report "target/diff-cover/report.json" "${{ github.event.pull_request.number }}" "${RUN_URL}"
280+ comment=$($COVERAGE_SCRIPT comment_report "target/diff-cover/report.json" "" "${RUN_URL}")
281+ echo "comment=$comment" >> $GITHUB_OUTPUT
282+
283+ - name : Post comment
284+ if : always() && steps.generate_comment.outputs.comment != ''
285+ uses : thollander/actions-comment-pull-request@v3
286+ with :
287+ message : ${{ steps.generate_comment.outputs.comment }}
288+ comment-tag : coverage-report
281289
282290 dependencies :
283291 needs : changes
You can’t perform that action at this time.
0 commit comments