Skip to content

init [#14] Discord Web Hook μ„€μ • #2

init [#14] Discord Web Hook μ„€μ •

init [#14] Discord Web Hook μ„€μ • #2

Workflow file for this run

name: 'PR Discord Notification'
on:
pull_request:
branches:
- develop
- main
types:
- opened
- closed
jobs:
notification:
runs-on: ubuntu-24.04
steps:
- name: Discord Notification
env:
ACTION: ${{ github.event.action }}
MERGED: ${{ github.event.pull_request.merged }}
USERNAME: ${{ github.event.pull_request.user.login }}
TITLE: ${{ github.event.pull_request.title }}
URL: ${{ github.event.pull_request.html_url }}
run: |
DESCRIPTION_MESSAGE="temp"
if [[ "$ACTION" == "opened" ]]; then
DESCRIPTION_MESSAGE="[ OPENED ] 였이였이 λ¦¬λ·°ν•˜λΌκ΅¬"
elif [[ "$ACTION" == "closed" && "$MERGED" == "true" ]]; then
DESCRIPTION_MESSAGE="[ MERGED ] πŸ’―πŸ’―πŸ’―"
else
DESCRIPTION_MESSAGE="[ CLOSED ] κΈ°ν–‰μ’…μ΄μ—ˆλ‹€λ‹ˆ,,"
fi
curl -X POST -H "Content-Type: application/json" \
-d '{
"embeds": [
{
"title": "😡 μ‹ μ£ μ˜€ μ‚¬μ‚¬κ²Œμ˜€ 😡",
"description": "**πŸ”₯ '"$DESCRIPTION_MESSAGE"' πŸ”₯**\nπŸ‘€ '"$USERNAME"'\nπŸ”Š '"$TITLE"'\nπŸ”— '"$URL"'",
"color": 6847432
}
]
}' ${{ secrets.DISCORD_WEBHOOK_URL }};