From a611e0d2651cbc76baf8c3c7cff8dc2fbb3252d1 Mon Sep 17 00:00:00 2001 From: ChoiseU Date: Wed, 30 Jul 2025 12:30:17 +0900 Subject: [PATCH 1/2] =?UTF-8?q?feat:=20=EB=A6=AC=EB=B7=B0=20=EC=95=8C?= =?UTF-8?q?=EB=A6=BC=20=EA=B5=AC=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/pr_bot.yml | 43 +++++++++++++++++++++++++++++++++++- 1 file changed, 42 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pr_bot.yml b/.github/workflows/pr_bot.yml index 22daee4..e77d5f4 100644 --- a/.github/workflows/pr_bot.yml +++ b/.github/workflows/pr_bot.yml @@ -7,6 +7,10 @@ on: types: [opened, closed, reopened, synchronize] issue_comment: types: [created] + pull_request_review: + types: [submitted] + pull_request_review_comment: + types: [created] jobs: notify: @@ -23,7 +27,7 @@ jobs: "username": "GitHub PR 봇", "embeds": [{ "title": "Pull Request #${{ github.event.pull_request.number }}: ${{ github.event.pull_request.title }}", - "description": "**${{ github.actor }}**님이 Pull Request를 생성하거나 업데이트했습니다.", + "description": "**${{ github.actor }}**님이 Pull Request를 생성 또는 업데이트했습니다.", "url": "${{ github.event.pull_request.html_url }}", "color": 2243312 }] @@ -84,3 +88,40 @@ jobs: }] }' \ ${{ secrets.DISCORD_WEBHOOK_URL }} + # ---------------------------- + # 리뷰 제출(Submit Review) 알림 + # ---------------------------- + - name: Send Review Submitted Notification + if: github.event_name == 'pull_request_review' && github.event.action == 'submitted' + run: | + REVIEW_BODY=$(echo "${{ github.event.review.body }}" | sed 's/"/\\"/g' | sed ':a;N;$!ba;s/\n/\\n/g') + curl -X POST -H "Content-Type: application/json" \ + -d "{ + \"username\": \"GitHub 리뷰 봇\", + \"embeds\": [{ + \"title\": \"New Review on PR #${{ github.event.pull_request.number }}\", + \"description\": \"**${{ github.actor }}**님이 리뷰를 남겼습니다: \\n${REVIEW_BODY}\", + \"url\": \"${{ github.event.review.html_url }}\", + \"color\": 16776960 + }] + }" \ + ${{ secrets.DISCORD_WEBHOOK_URL }} + + # ------------------------- + # 리뷰 댓글에 대한 답글 알림 + # ------------------------- + - name: Send Review Comment Notification + if: github.event_name == 'pull_request_review_comment' && github.event.action == 'created' + run: | + COMMENT_BODY=$(echo "${{ github.event.comment.body }}" | sed 's/"/\\"/g' | sed ':a;N;$!ba;s/\n/\\n/g') + curl -X POST -H "Content-Type: application/json" \ + -d "{ + \"username\": \"GitHub 댓글 봇\", + \"embeds\": [{ + \"title\": \"New Reply on PR #${{ github.event.pull_request.number }}\", + \"description\": \"**${{ github.actor }}**님의 새 답글: \\n${COMMENT_BODY}\", + \"url\": \"${{ github.event.comment.html_url }}\", + \"color\": 15105570 + }] + }" \ + ${{ secrets.DISCORD_WEBHOOK_URL }} \ No newline at end of file From 1fd34bf213bde6433adf511ffa1b0ba44bc2cb33 Mon Sep 17 00:00:00 2001 From: ChoiseU Date: Wed, 30 Jul 2025 12:51:25 +0900 Subject: [PATCH 2/2] =?UTF-8?q?style:=20=EC=A4=84=EB=B0=94=EA=BF=88=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/pr_bot.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/pr_bot.yml b/.github/workflows/pr_bot.yml index e77d5f4..f9f5838 100644 --- a/.github/workflows/pr_bot.yml +++ b/.github/workflows/pr_bot.yml @@ -88,6 +88,7 @@ jobs: }] }' \ ${{ secrets.DISCORD_WEBHOOK_URL }} + # ---------------------------- # 리뷰 제출(Submit Review) 알림 # ----------------------------