Skip to content

Commit dfee716

Browse files
committed
More secure webhook
1 parent 0e7e5c5 commit dfee716

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

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

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,14 @@ 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 }}
1418
run: |
1519
curl -X POST ${{ secrets.DISCORD_WEBHOOK }} \
1620
-H "Content-Type: application/json" \
1721
-d '{
18-
"content": "🚀 **New PR:** ${{ github.event.pull_request.title }}\n🔗 <${{ github.event.pull_request.html_url }}>\n👤 **Author:** ${{ github.event.pull_request.user.login }}",
19-
"thread_name": "${{ github.event.pull_request.title }} by ${{ github.event.pull_request.user.login }}"
22+
"content": "🚀 **New PR:** $PR_TITLE\n🔗 <$PR_URL>\n👤 **Author:** $PR_USER",
23+
"thread_name": "$PR_TITLE by $PR_USER"
2024
}'

0 commit comments

Comments
 (0)