hrms-api-org/.github/workflows/discord-notify.yml
Kittapath 2f3a377d38
Task/1 (#183)
* refactor code create user emp

* test pull request

* test

* test noti

* test noti

* test noti link

* test

---------

Co-authored-by: mamoss <>
2025-10-06 16:29:04 +07:00

22 lines
892 B
YAML

name: Discord PR Notify
on:
pull_request:
types: [opened]
jobs:
discord:
runs-on: ubuntu-latest
steps:
- name: Send Discord
run: |
curl -X POST "${{ secrets.DISCORD_WEBHOOK_PULLREQUEST }}" \
-H "Content-Type: application/json" \
-d '{
"embeds": [{
"title": "🔔 **Service:** ${{ github.repository }}",
"description": "👤 **Author:** ${{ github.event.pull_request.user.login }}\n🌿 **Branch:** ${{ github.event.pull_request.head.ref }} → ${{ github.event.pull_request.base.ref }}\n📦 **Pull Request:** [#${{ github.event.pull_request.number }} - ${{ github.event.pull_request.title }}](${{ github.event.pull_request.html_url }})",
"color": 5814783,
"timestamp": "${{ github.event.pull_request.created_at }}"
}]
}'