-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathrequest-comment-with-discord.yml
More file actions
60 lines (52 loc) · 1.92 KB
/
request-comment-with-discord.yml
File metadata and controls
60 lines (52 loc) · 1.92 KB
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
name: review and sent Discord message
on:
pull_request_review:
branches:
- 'develop'
types: [ submitted ] # 리뷰가 제출될 때
pull_request_review_comment:
branches:
- 'develop'
types: [ created ] # 리뷰 코멘트가 생성될 때
jobs:
send_discord_message:
runs-on: ubuntu-latest
if: ${{ github.event.review.state != 'approved' }}
steps:
- name: 작업자와 리뷰어를 결정한다.
run: |
if [ "${{ github.event.pull_request.user.login }}" == "david-parkk" ]; then
echo "PR_OWNER=<@568069533214965760>" >> $GITHUB_ENV
else
echo "PR_OWNER=<@373383545873235970>" >> $GITHUB_ENV
fi
- name: 리뷰 요청 Discord 메세지를 보낸다
uses: Ilshidur/action-discord@master
env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
DISCORD_USERNAME: 개발진스
DISCORD_AVATAR: "https://github.com/user-attachments/assets/1ff8e3ad-40c1-4a99-85cf-367376ed5d93"
DISCORD_EMBEDS: '
[
{
"url": "${{github.event.pull_request.html_url}}",
"title": ":musical_note: 리뷰 코멘트가 생성되었습니다.",
"fields": [
{
"name": "PR 주인",
"value": "${{env.PR_OWNER}}",
"inline": true
},
{
"name": "코멘트 내용",
"value": "${{ github.event.comment.body }}"
}
]
}
]'
- name: 리뷰와 코멘트 처리
run: |
echo "리뷰가 제출되었습니다!"
echo "리뷰의 상태는: ${{ github.event.review.state }}"
echo "리뷰어: ${{ github.event.review.user.login }}"
echo "리뷰 코멘트 내용: ${{ github.event.comment.body }}"