Tweak test results comments on PRs (#1134)

This commit is contained in:
Bart Louwers
2023-05-13 09:40:37 +02:00
committed by GitHub
parent 72a1f78647
commit 2b1c2c8aaf
2 changed files with 3 additions and 1 deletions

View File

@@ -59,6 +59,7 @@ jobs:
- name: 'Leave comment on PR with test results'
uses: marocchino/sticky-pull-request-comment@v2
with:
header: render-test-result
number: ${{ env.pr_number }}
hide_and_recreate: true
hide_classify: "OUTDATED"

View File

@@ -66,13 +66,14 @@ jobs:
echo pr_number="$(cat ./pr_number)" >> "$GITHUB_ENV"
echo old_size="$(cat ./size_main)" >> "$GITHUB_ENV"
echo new_size="$(cat ./size)" >> "$GITHUB_ENV"
echo percentage_change=$(awk 'NR==FNR{a=$0;next}{printf "%+.2f%%\n", 100*($0-a)/a}' $new_size $old_size) >> "$GITHUB_ENV"
echo percentage_change=$(awk 'NR==FNR{a=$0;next}{printf "%+.2f%%\n", 100*($0-a)/a}' ./size ./size_main) >> "$GITHUB_ENV"
if: github.event.workflow_run.event == 'pull_request'
- name: 'Leave comment on PR with test results'
if: github.event.workflow_run.event == 'pull_request'
uses: marocchino/sticky-pull-request-comment@v2
with:
header: size-test-result
number: ${{ env.pr_number }}
hide_and_recreate: true
hide_classify: "OUTDATED"