Skip to content

feat-fe: [웹 접근성 개선] 지원하기 탭 개선하기 #144

feat-fe: [웹 접근성 개선] 지원하기 탭 개선하기

feat-fe: [웹 접근성 개선] 지원하기 탭 개선하기 #144

name: FE/CI - PR 리뷰 준비 메시지 전송
on:
pull_request:
types: [opened, ready_for_review]
branches:
- fe/develop
jobs:
pr-ready:
runs-on: ubuntu-latest
steps:
- name: Set reviewer and sender variables
id: set-vars
run: |
echo "ASSIGNEE_SLACK_ID=${{ env[github.event.pull_request.assignee.login] }}" >> $GITHUB_ENV
- name: Set reviewer and sender nickname
id: set-nicks
run: |
echo "ASSIGNEE_NICKNAME=${{ env[format('{0}', env.ASSIGNEE_SLACK_ID)] }}" >> $GITHUB_ENV
- name: pr review 요청 -> 리뷰어에게 slack 멘션 알림
id: send-message
uses: slackapi/[email protected]
with:
channel-id: ${{ secrets.REVIEW_MENTION_CHANNEL_ID }}
payload: |
{
"blocks": [
{
"type": "divider"
},
{
"type": "header",
"text": {
"type": "plain_text",
"text": "🎁 (#${{ github.event.pull_request.number }}) Pull Request가 준비되었습니다!",
"emoji": true
}
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "\n*진행자:*\n${{ env.ASSIGNEE_NICKNAME }}"
}
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "*${{ github.event.pull_request.title }}*"
},
"accessory": {
"type": "button",
"text": {
"type": "plain_text",
"text": "👉🏻 PR 바로가기 👈🏻",
"emoji": true
},
"value": "바로가기 링크",
"url": "${{ github.event.pull_request.html_url }}",
"action_id": "button-action"
}
},
{
"type": "divider"
}
],
"icon_url": "${{ github.event.sender.avatar_url }}"
}
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
- name: Slack 메세지 ID를 PR comment에 등록
uses: peter-evans/create-or-update-comment@v4
with:
issue-number: ${{ github.event.number }}
body: |
${{ steps.send-message.outputs.ts }}