Skip to content

Commit

Permalink
fix: 슬랙 봇 워크플로우 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
jsk3342 committed Nov 13, 2024
1 parent 655bf7e commit 07745fe
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions .github/workflows/pr-slack-notify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,22 @@ jobs:
echo "reviewer_names=전체" >> $GITHUB_OUTPUT
fi
- name: Process PR title and body
id: pr_process
run: |
# PR 제목 처리
title='${{ github.event.pull_request.title }}'
title="${title//'"'/'\\"'}"
echo "title=${title}" >> $GITHUB_OUTPUT
# PR 내용 처리
body='${{ github.event.pull_request.body }}'
body="${body//'%'/'%25'}"
body="${body//$'\n'/'\\n'}"
body="${body//$'\r'/'\\r'}"
body="${body//'"'/'\\"'}"
echo "body=${body}" >> $GITHUB_OUTPUT
- name: Send Slack notification
uses: 8398a7/action-slack@v3
with:
Expand Down Expand Up @@ -57,14 +73,14 @@ jobs:
"type": "section",
"text": {
"type": "mrkdwn",
"text": "*PR 제목:*\n<${{ github.event.pull_request.html_url }}|${{ toJSON(github.event.pull_request.title) }}>"
"text": "*PR 제목:*\n<${{ github.event.pull_request.html_url }}|${{ steps.pr_process.outputs.title }}>"
}
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "*PR 설명:*\n${{ toJSON(github.event.pull_request.body) }}"
"text": "*PR 설명:*\n${{ steps.pr_process.outputs.body }}"
}
},
{
Expand Down

0 comments on commit 07745fe

Please sign in to comment.