diff --git a/.github/actions/pit-results-comment/action.yml b/.github/actions/pit-results-comment/action.yml index 4f7b25364..2f2ca22b4 100644 --- a/.github/actions/pit-results-comment/action.yml +++ b/.github/actions/pit-results-comment/action.yml @@ -49,7 +49,7 @@ runs: cp "${NEW_STATS_FILE}" "${PREV_STATS_FILE}" fi - ./.github/actions/pit-results-comment/stats-to-comment.sh "${PREV_STATS_FILE}" "${NEW_STATS_FILE}" "${{ inputs.prev-commit }}" > "${RESULTS_COMMENT_FILE}" + ./.github/actions/pit-results-comment/stats-to-comment.sh "${PREV_STATS_FILE}" "${NEW_STATS_FILE}" "${{ inputs.prev-commit }}" "${{ github.sha }}" > "${RESULTS_COMMENT_FILE}" curl -X POST \ -H "Authorization: Bearer ${{ inputs.token }}" \ diff --git a/.github/actions/pit-results-comment/stats-to-comment.sh b/.github/actions/pit-results-comment/stats-to-comment.sh index d96ab0a33..0581b35c6 100755 --- a/.github/actions/pit-results-comment/stats-to-comment.sh +++ b/.github/actions/pit-results-comment/stats-to-comment.sh @@ -63,10 +63,17 @@ EOF "${1}" "${2}" --raw-output if [[ -n "${3}" ]]; then - cat << EOF + if [[ -n "${4}" ]]; then + cat << EOF Previous run: ${3} EOF + else + cat << EOF + +Previous run: ${3} - [Diff](/${GITHUB_REPOSITORY}/compare/${3}...${4}) +EOF + fi cat << EOF