We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 515c277 + 41d535b commit d6c1fe5Copy full SHA for d6c1fe5
1 file changed
.github/workflows/discord.yml
@@ -10,8 +10,8 @@ jobs:
10
steps:
11
- name: Send Discord Embed via Curl
12
run: |
13
- # Escape the commit message to preserve newlines and markdown
14
- MESSAGE=$(echo '${{ github.event.head_commit.message }}' | jq -Rs . | sed 's/^"//;s/"$//')
+ # Properly escape newlines and markdown in the commit message
+ MESSAGE=$(echo '${{ github.event.head_commit.message }}' | sed 's/"/\\"/g' | sed ':a;N;$!ba;s/\n/\\n/g')
15
16
PAYLOAD=$(jq -n --arg author "${{ github.actor }}" \
17
--arg author_avatar "${{ github.actor_avatar_url }}" \
0 commit comments