Skip to content

Commit

Permalink
Trying to add the redable coverage report in the comment
Browse files Browse the repository at this point in the history
  • Loading branch information
Sachinbisht27 committed Sep 13, 2023
1 parent 9d43f92 commit 9d20d5a
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/unit-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,13 @@ jobs:
formatted_comment=$(cat coverage_comment.txt | jq -Rs '.')
echo "Coverage details are available below:" >> $formatted_comment
formatted_comment=$(echo "$formatted_comment" | sed 's/\x1B\[[0-9;]*[JKmsu]//g')
echo "Coverage details are available below:" >> coverage_comment.txt
echo "$formatted_comment" >> coverage_comment.txt
curl -X POST \
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
-H "Content-Type: application/json" \
-d "{\"body\": $formatted_comment}" \
-d "{\"body\": \"$formatted_comment\"}" \
"https://api.github.com/repos/$GITHUB_REPOSITORY/issues/${{ github.event.pull_request.number }}/comments"

0 comments on commit 9d20d5a

Please sign in to comment.