Slack Alarm for PR review #53
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Slack Alarm for PR review | |
on: | |
pull_request_review: | |
types: [submitted] # Pull Request에 대한 리뷰가 제출되었을때 | |
jobs: | |
notify-slack: | |
runs-on: ubuntu-latest | |
steps: | |
### Slack Alarm for PR review ### | |
- name: Notify Slack on PR review | |
if: ${{ github.event_name == 'pull_request_review' }} | |
uses: slackapi/[email protected] | |
with: | |
payload: | | |
{ | |
"channel": "C06FGQEQ1CP", | |
"attachments": [ | |
{ | |
"color": "#0e5fd5", | |
"title": ":speech_balloon: PR Review", | |
"title_link": "https://github.com/${{ github.repository }}/pull/${{ github.event.pull_request.number }}", | |
"text": "'${{ github.event.pull_request.user.login }}'의 PR에 '${{ github.event.review.user.login }}'가 리뷰를 남겼습니다.", | |
"fields": [ | |
{ | |
"title": "Repository", | |
"value": "${{ github.repository }}", | |
"short": true | |
}, | |
{ | |
"title": "PR Number", | |
"value": "${{ github.event.pull_request.number }}", | |
"short": true | |
} | |
] | |
} | |
] | |
} | |
env: | |
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} | |
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK |