Skip to content

Commit 708baf1

Browse files
Copilotnetmindz
andcommitted
Fix pr-merge.yaml to include PR title and link in Discord notifications
Co-authored-by: netmindz <[email protected]>
1 parent 4155a6b commit 708baf1

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

.github/workflows/pr-merge.yaml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,14 @@
2525
echo "Job originally triggered by ${{ github.actor }}"
2626
exit 1
2727
- name: Send Discord notification
28+
env:
29+
PR_NUMBER: ${{ github.event.pull_request.number }}
30+
PR_TITLE: ${{ github.event.pull_request.title }}
31+
PR_URL: ${{ github.event.pull_request.html_url }}
32+
ACTOR: ${{ github.actor }}
2833
run: |
29-
curl -H "Content-Type: application/json" -d '{"content": "Pull Request ${{ github.event.pull_request.number }} merged by ${{ github.actor }}"}' ${{ secrets.DISCORD_WEBHOOK_BETA_TESTERS }}
34+
jq -n \
35+
--arg content "Pull Request #${PR_NUMBER} \"${PR_TITLE}\" merged by ${ACTOR}
36+
${PR_URL}" \
37+
'{content: $content}' \
38+
| curl -H "Content-Type: application/json" -d @- ${{ secrets.DISCORD_WEBHOOK_BETA_TESTERS }}

0 commit comments

Comments
 (0)