File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1010 steps :
1111 - name : Send Discord Embed via Curl
1212 run : |
13- # Properly escape newlines and markdown in the commit message
14- MESSAGE=$(echo '${{ github.event.head_commit.message }}' | sed 's/"/\\"/g' | sed ':a;N;$!ba;s/\n/\\n/g ')
13+ # Process the commit message to preserve formatting
14+ MESSAGE=$(echo '${{ github.event.head_commit.message }}' | jq -Rs . | sed 's/^"//;s/"$// ')
1515
1616 PAYLOAD=$(jq -n --arg author "${{ github.actor }}" \
1717 --arg author_avatar "${{ github.actor_avatar_url }}" \
2222 '{
2323 "embeds": [
2424 {
25- "id": 120388608,
2625 "description": ("__**New Update**__\nA new update has been released!\n**V" + $version + "**\n" + $message + "\n*[View Full Changelog](" + $url + ")*"),
27- "fields": [],
2826 "color": 3101622,
2927 "footer": {
3028 "icon_url": $author_avatar,
You can’t perform that action at this time.
0 commit comments