From aee4544d38c56e9846dddd431b43c60d15a2b733 Mon Sep 17 00:00:00 2001 From: Robert Duncan Date: Sat, 21 Oct 2023 22:49:48 -0700 Subject: [PATCH] fix: omit comment when empty --- .github/workflows/main.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 6c706ba..f9cbec0 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -36,7 +36,7 @@ jobs: sed -i -n '/
/,/<\/pre>/p' diff_output.html
       
       - name: Post comment
-        if: github.event_name == 'pull_request'
+        if: github.event_name == 'pull_request' && $(grep -qE "\S" diff_output.html)
         uses: actions/github-script@v6
         with:
           script: |