File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3030 export ICON
3131 echo "ICON=\"${ICON}\"" >> $GITHUB_ENV
3232 - name : Trim Body
33+ env :
34+ COMMIT_MESSAGE : ${{ toJSON(github.event.head_commit.message) }}
3335 shell : bash
3436 run : |
35- BODYLINE='${{ toJSON(github.event.head_commit.message) }}'
37+ BODYLINE="$COMMIT_MESSAGE"
3638 BODYLINE="${BODYLINE#\"}"
3739 BODYLINE="${BODYLINE%\"}"
3840 TRIMMED_BODY="${BODYLINE:0:350}"
Original file line number Diff line number Diff line change 3939 fi
4040
4141 # Properly handle JSON-escaped body - strip outer quotes and truncate
42- BODYLINE='${{ toJSON(github.event.head_commit.message) }}'
42+ BODYLINE="$BODY"
4343 BODYLINE="${BODYLINE#\"}"
44- BODYLINE="${BODYLINE%\"}"
44+ BODYLINE="${BODYLINE%\""}
4545 TRIMMED_BODY="${BODYLINE:0:350}"
4646
4747 # Create JSON using jq for proper escaping
Original file line number Diff line number Diff line change @@ -18,11 +18,15 @@ jobs:
1818 runs-on : ubuntu-latest
1919 steps :
2020 - name : Trim Body
21+ env :
22+ RELEASE_BODY : ${{ toJSON(github.event.release.body) }}
2123 shell : bash
2224 run : |
23- body="${{ github.event.release.body }}"
25+ body="$RELEASE_BODY"
26+ body="${body#\"}"
27+ body="${body%\"}"
2428 result="${body:0:350}"
25- echo "BODY=$(echo "$ {result}") " >> $GITHUB_ENV
29+ echo "BODY=${result}" >> $GITHUB_ENV
2630 - name : Send toot to Mastodon
2731 continue-on-error : true
2832 id : mastodon
You can’t perform that action at this time.
0 commit comments