-
Notifications
You must be signed in to change notification settings - Fork 1
125 lines (119 loc) · 5.76 KB
/
discord_notification.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
name: Repository Notifications
on:
issues:
types: [ opened, closed ]
pull_request:
types: [ opened, closed ]
jobs:
notify:
name: Discord Notification
runs-on: ubuntu-latest
steps:
- name: Send Issue Opened Notification
if: ${{ github.event_name == 'issues' && github.event.action == 'opened' }}
uses: Ilshidur/[email protected]
env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK_REPO }}
DISCORD_USERNAME: REPO_CAT
DISCORD_AVATAR: https://github.com/user-attachments/assets/f48ce758-689e-4e2c-8cba-d9397905c90f
DISCORD_EMBEDS: |
[
{
"title": "새 이슈가 왔다냥 🐈⬛ \n${{ github.event.issue.title }}",
"color": 10478271,
"description": "${{ github.event.issue.html_url }}",
"fields": [
{
"name": "Issue Number",
"value": "#${{ github.event.issue.number }}",
"inline": true
},
{
"name": "Author",
"value": "${{ github.event.issue.user.login }}",
"inline": true
}
]
}
]
- name: Send Issue Closed Notification
if: ${{ github.event_name == 'issues' && github.event.action == 'closed' }}
uses: Ilshidur/[email protected]
env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK_REPO }}
DISCORD_USERNAME: REPO_CAT
DISCORD_AVATAR: https://github.com/user-attachments/assets/f48ce758-689e-4e2c-8cba-d9397905c90f
DISCORD_EMBEDS: |
[
{
"title": "이슈가 닫혔다냥 🛑\n${{ github.event.issue.title }}",
"color": 15158332,
"description": "${{ github.event.issue.html_url }}",
"fields": [
{
"name": "Issue Number",
"value": "#${{ github.event.issue.number }}",
"inline": true
},
{
"name": "Closed by",
"value": "${{ github.event.sender.login }}",
"inline": true
}
]
}
]
- name: Send PR Opened Notification
if: ${{ github.event_name == 'pull_request' && github.event.action == 'opened' }}
uses: Ilshidur/[email protected]
env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK_REPO }}
DISCORD_USERNAME: REPO_CAT
DISCORD_AVATAR: https://github.com/user-attachments/assets/f48ce758-689e-4e2c-8cba-d9397905c90f
DISCORD_EMBEDS: |
[
{
"title": "새로운 PR이 생성되었다냥 🚀\n${{ github.event.pull_request.title }}",
"color": 5763719,
"description": "${{ github.event.pull_request.html_url }}",
"fields": [
{
"name": "PR Number",
"value": "#${{ github.event.pull_request.number }}",
"inline": true
},
{
"name": "Author",
"value": "${{ github.event.pull_request.user.login }}",
"inline": true
}
]
}
]
- name: Send PR Merged Notification
if: ${{ github.event_name == 'pull_request' && github.event.action == 'closed' && github.event.pull_request.merged == true }}
uses: Ilshidur/[email protected]
env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK_REPO }}
DISCORD_USERNAME: REPO_CAT
DISCORD_AVATAR: https://github.com/user-attachments/assets/f48ce758-689e-4e2c-8cba-d9397905c90f
DISCORD_EMBEDS: |
[
{
"title": "PR이 머지되었다냥 🎉\n${{ github.event.pull_request.title }}",
"color": 15844367,
"description": "${{ github.event.pull_request.html_url }}",
"fields": [
{
"name": "PR Number",
"value": "#${{ github.event.pull_request.number }}",
"inline": true
},
{
"name": "Merged by",
"value": "${{ github.event.sender.login }}",
"inline": true
}
]
}
]