-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (39 loc) Β· 1.32 KB
/
discord-pr-hook.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
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 }};