Skip to content

Commit

Permalink
More secure webhook
Browse files Browse the repository at this point in the history
  • Loading branch information
mrubens committed Feb 2, 2025
1 parent 0e7e5c5 commit dfee716
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/discord-pr-notify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,14 @@ jobs:
if: github.head_ref != 'changeset-release/main'
steps:
- name: Send Discord Notification
env:
PR_TITLE: ${{ github.event.pull_request.title }}
PR_URL: ${{ github.event.pull_request.html_url }}
PR_USER: ${{ github.event.pull_request.user.login }}
run: |
curl -X POST ${{ secrets.DISCORD_WEBHOOK }} \
-H "Content-Type: application/json" \
-d '{
"content": "🚀 **New PR:** ${{ github.event.pull_request.title }}\n🔗 <${{ github.event.pull_request.html_url }}>\n👤 **Author:** ${{ github.event.pull_request.user.login }}",
"thread_name": "${{ github.event.pull_request.title }} by ${{ github.event.pull_request.user.login }}"
"content": "🚀 **New PR:** $PR_TITLE\n🔗 <$PR_URL>\n👤 **Author:** $PR_USER",
"thread_name": "$PR_TITLE by $PR_USER"
}'

0 comments on commit dfee716

Please sign in to comment.