File tree Expand file tree Collapse file tree 1 file changed +11
-9
lines changed Expand file tree Collapse file tree 1 file changed +11
-9
lines changed Original file line number Diff line number Diff line change @@ -11,14 +11,16 @@ jobs:
1111 if : github.head_ref != 'changeset-release/main'
1212 steps :
1313 - name : Send Discord Notification
14- env :
15- PR_TITLE : ${{ github.event.pull_request.title }}
16- PR_URL : ${{ github.event.pull_request.html_url }}
17- PR_USER : ${{ github.event.pull_request.user.login }}
1814 run : |
19- curl -X POST ${{ secrets.DISCORD_WEBHOOK }} \
15+ PAYLOAD=$(jq -n \
16+ --arg title "${{ github.event.pull_request.title }}" \
17+ --arg url "${{ github.event.pull_request.html_url }}" \
18+ --arg author "${{ github.event.pull_request.user.login }}" \
19+ '{
20+ content: ("🚀 **New PR:** " + $title + "\n🔗 <" + $url + ">\n👤 **Author:** " + $author),
21+ thread_name: ($title + " by " + $author)
22+ }')
23+
24+ curl -X POST "${{ secrets.DISCORD_WEBHOOK }}" \
2025 -H "Content-Type: application/json" \
21- -d '{
22- "content": "🚀 **New PR:** $PR_TITLE\n🔗 <$PR_URL>\n👤 **Author:** $PR_USER",
23- "thread_name": "$PR_TITLE by $PR_USER"
24- }'
26+ -d "$PAYLOAD"
You can’t perform that action at this time.
0 commit comments