Skip to content

Commit 3e303ea

Browse files
authored
Merge pull request RooCodeInc#742 from RooVetGit/discord_fix_again
Discord fix again
2 parents e16e132 + 0bcfbd4 commit 3e303ea

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

.github/workflows/discord-pr-notify.yml

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff 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"

0 commit comments

Comments
 (0)