Skip to content

Commit 6b99375

Browse files
committed
Add link to diff between test coverage runs
1 parent 39be670 commit 6b99375

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

.github/actions/pit-results-comment/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ runs:
4949
cp "${NEW_STATS_FILE}" "${PREV_STATS_FILE}"
5050
fi
5151
52-
./.github/actions/pit-results-comment/stats-to-comment.sh "${PREV_STATS_FILE}" "${NEW_STATS_FILE}" "${{ inputs.prev-commit }}" > "${RESULTS_COMMENT_FILE}"
52+
./.github/actions/pit-results-comment/stats-to-comment.sh "${PREV_STATS_FILE}" "${NEW_STATS_FILE}" "${{ inputs.prev-commit }}" "${{ github.sha }}" > "${RESULTS_COMMENT_FILE}"
5353
5454
curl -X POST \
5555
-H "Authorization: Bearer ${{ inputs.token }}" \

.github/actions/pit-results-comment/stats-to-comment.sh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,17 @@ EOF
6363
"${1}" "${2}" --raw-output
6464

6565
if [[ -n "${3}" ]]; then
66-
cat << EOF
66+
if [[ -n "${4}" ]]; then
67+
cat << EOF
6768
6869
Previous run: ${3}
6970
EOF
71+
else
72+
cat << EOF
73+
74+
Previous run: ${3} - [Diff](/${GITHUB_REPOSITORY}/compare/${3}...${4})
75+
EOF
76+
fi
7077

7178
cat << EOF
7279

0 commit comments

Comments
 (0)