From adaf627fe3460160bee1e7e719dfc40d659bb18d Mon Sep 17 00:00:00 2001 From: hugsy Date: Sat, 16 Dec 2023 10:47:47 -0800 Subject: [PATCH] Last fix --- .github/workflows/coverage.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 22f08c1d0..1194ec626 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -37,8 +37,8 @@ jobs: new_score=$(cat docs/coverage/gef_py.html | grep pc_cov | sed 's?.*\([^%]*\)%?\1?g') diff_score=$(python -c "print(${new_score} - ${current_score})") commit=${{ github.event.pull_request.head.sha }} - include_tests=$(git diff ${{ github.event.pull_request.base.sha }}..${{ github.event.pull_request.head.sha }} --compact-summary | egrep --count '^ tests/' || true) - include_docs=$(git diff ${{ github.event.pull_request.base.sha }}..${{ github.event.pull_request.head.sha }} --compact-summary | egrep --count '^ docs/' || true) + include_tests=$(git diff ${{ github.event.pull_request.base.sha }}..${{ github.event.pull_request.head.sha }} --compact-summary | egrep --count '^ tests/' || 0) + include_docs=$(git diff ${{ github.event.pull_request.base.sha }}..${{ github.event.pull_request.head.sha }} --compact-summary | egrep --count '^ docs/' || 0) echo "commit=${commit}" >> $GITHUB_OUTPUT echo "new_coverage_score=${new_score}" >> $GITHUB_OUTPUT echo "current_coverage_score=${current_score}" >> $GITHUB_OUTPUT @@ -76,8 +76,8 @@ jobs: * Difference: ${process.env.SCORE_DIFF} ${(diff_score >= 0) ? "🟢" : "🔴"} To this point, this PR: - * ${(tests_changes == 0) ? "**does not** include" : "includes"} changes to tests - * ${(docs_changes == 0) ? "**does not** include" : "includes"} changes to documentation + * ${(tests_changes > 0) ? "includes" : "**does not** include" } changes to tests + * ${(docs_changes > 0) ? "includes" : "**does not** include" } changes to documentation * ${(forbidden_words.length === 0 || forbidden_words[0] === '') ? "**does not** include forbidden words" : "includes the forbidden words:" + forbidden_words.join(", ")} `;