From 0ce0df8404ae1e3aa13bdbe74455cf277d456da8 Mon Sep 17 00:00:00 2001 From: Dmitry Gurovich Date: Fri, 19 Apr 2024 21:27:46 +0300 Subject: [PATCH] fix files list --- .github/workflows/commit-notify.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/commit-notify.yml b/.github/workflows/commit-notify.yml index 9fab3c0..0facf4e 100644 --- a/.github/workflows/commit-notify.yml +++ b/.github/workflows/commit-notify.yml @@ -33,12 +33,15 @@ jobs: SHA=${{ matrix.notif.commit.sha }} SUBJ=$(echo "${{ matrix.notif.commit.commit.message }}" | head -1) EMAIL_SUBJ="[$GITHUB_REPOSITORY] ${SHA:0:10} $SUBJ" - EMAIL_BODY="Author: ${{ matrix.notif.commit.commit.author.name }} ${{ matrix.notif.commit.commit.author.email }} + FILES=$( echo '${{ toJSON(matrix.notif.commit.files) }}' | jq --raw-output '.[].filename | select(. != null)' ) + EMAIL_BODY=$(cat <<- ___EOF___ + Author: ${{ matrix.notif.commit.commit.author.name }} ${{ matrix.notif.commit.commit.author.email }} Message: ${{ matrix.notif.commit.commit.message }} Files: - $( echo '${{ toJSON(matrix.notif.commit.files) }}' | jq --raw-output '.[].filename | select(. != null)' ) + $FILES Commit: ${{ matrix.notif.commit.html_url }} - " + ___EOF___ + ) echo "To: $EMAIL_TO" echo "Subj: $EMAIL_SUBJ"