Skip to content

test: test pr

test: test pr #9

Workflow file for this run

name: Pull Request and Comments
on:
pull_request:
types: [review_requested]
issue_comment:
types: [created]
jobs:
specific_review_requested:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Send Slack Notification
id: slack_notification
uses: slackapi/[email protected]
with:
channel-id: ${{ secrets.PR_NOTI_CHANNEL }}
payload: |
{
"text": "pr review request",
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "리뷰어로 할당되었습니다.\n • 제목: ${{ github.event.pull_request.title }}\n • 리뷰어: <@U12345>\n • 링크: <${{ github.event.pull_request.html_url }}|리뷰하러 가기>"
}
}
]
}
env:
SLACK_BOT_TOKEN: ${{ secrets.PR_BOT_TOKEN }}
- name: Save Thread Timestamp
run: echo "thread_ts=${{ steps.slack_notification.outputs.thread_ts }}" >> $GITHUB_ENV
comment_to_slack_thread:
runs-on: ubuntu-latest
if: github.event_name == 'issue_comment'
steps:
- uses: actions/checkout@v3
- name: Comment on Slack Thread
uses: slackapi/[email protected]
with:
channel-id: ${{ secrets.PR_NOTI_CHANNEL }}
payload: |
{
"text": "PR 코멘트 알림",
"thread_ts": "${{ env.thread_ts }}",
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "| *작성자*: @${{ github.event.comment.user.login }}\n| *코멘트 내용*: _${{ github.event.comment.body }}_\n| *관련 PR*: <${{ github.event.issue.html_url }}|${{ github.event.issue.title }}>"
}
}
]
}
env:
SLACK_BOT_TOKEN: ${{ secrets.PR_BOT_TOKEN }}