Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
2jammers committed Jul 9, 2024
1 parent 1f3d82d commit 73ba4b9
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion .github/workflows/discord.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,19 @@ jobs:
if [ "${{ github.event_name }}" == "issues" ]; then
EVENT_URL="${{ github.event.issue.html_url }}"
EVENT_TITLE="${{ github.event.issue.title }}"
EVENT_BODY="${{ github.event.issue.body }}"
elif [ "${{ github.event_name }}" == "pull_request" ]; then
EVENT_URL="${{ github.event.pull_request.html_url }}"
EVENT_TITLE="${{ github.event.pull_request.title }}"
EVENT_BODY="${{ github.event.pull_request.body }}"
fi
curl -X POST -H "Content-Type: application/json" \
-d "{\"content\": \"[Content](${EVENT_URL})\", \"thread_name\": \"${EVENT_TITLE}\"}" \
-d '{
"embeds": [{
"title": "${EVENT_TITLE}",
"url": "${EVENT_URL}",
"description": "${EVENT_BODY}",
}],
"thread_name": "${EVENT_TITLE}"
'}
$WEBHOOK_URL

0 comments on commit 73ba4b9

Please sign in to comment.