Skip to content

.github/workflows/submitted-pr-review-notification.yml #257

.github/workflows/submitted-pr-review-notification.yml

.github/workflows/submitted-pr-review-notification.yml #257

on:
pull_request_review:
types: [submitted]
jobs:
approved:
if: github.event.review.state == 'APPROVED'
runs-on: ubuntu-latest
steps:
- name: Send Approve Message
uses: Ilshidur/[email protected]
env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
DISCORD_USERNAME: BFF BOT
DISCORD_AVATAR: https://github.com/YAPP-Github/24th-App-Team-1-Android/assets/77484719/611fc015-8f91-4645-90c9-2ae9e86d9e7b
DISCORD_EMBEDS: |
[
{
"title": "PR 어프로브, 이건 매튜의 특급칭찬이야 ~ 😘😘 \n${{ github.event.pull_request.title }}",
"color": 10478271,
"description": "${{ github.event.review.html_url }}",
"fields": [
{
"name": "Reviewer",
"value": "${{ github.event.review.user.login }}",
"inline": true
},
{
"name": "Comment",
"value": "${{ github.event.review.body }}",
"inline": true
},
{
"name": "State",
"value": "${{ github.event.review.state }}",
"inline": true
}
]
}
]
changes_requested:
if: github.event.review.state == 'changes_requested'
runs-on: ubuntu-latest
steps:
- name: Send Comment Message
uses: Ilshidur/[email protected]
env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
DISCORD_USERNAME: BFF BOT
DISCORD_AVATAR: https://github.com/YAPP-Github/24th-App-Team-1-Android/assets/77484719/611fc015-8f91-4645-90c9-2ae9e86d9e7b
DISCORD_EMBEDS: |
[
{
"title": "PR 수정 요청, 매튜짱 엉덩이 가져와 \n${{ github.event.pull_request.title }}",
"color": 13458524,
"description": "${{ github.event.review.html_url }}",
"fields": [
{
"name": "Reviewer",
"value": "${{ github.event.review.user.login }}",
"inline": true
},
{
"name": "Comment",
"value": "${{ github.event.review.body }}",
"inline": true
},
{
"name": "State",
"value": "${{ github.event.review.state }}",
"inline": true
}
]
}
]
commented:
if: github.event.review.state == 'commented'
runs-on: ubuntu-latest
steps:
- name: Send Comment Message
uses: Ilshidur/[email protected]
env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
DISCORD_USERNAME: BFF BOT
DISCORD_AVATAR: https://github.com/YAPP-Github/24th-App-Team-1-Android/assets/77484719/611fc015-8f91-4645-90c9-2ae9e86d9e7b
DISCORD_EMBEDS: |
[
{
"title": "PR New Comment, 제이콥/브라우니 대답. 😮😮 \n${{ github.event.pull_request.title }}",
"color": 16187019,
"description": "${{ github.event.review.html_url }}",
"fields": [
{
"name": "Reviewer",
"value": "${{ github.event.review.user.login }}",
"inline": true
},
{
"name": "State",
"value": "${{ github.event.review.state }}",
"inline": true
}
]
}
]