Release 1.0.1v #6
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: Closed PR Notification | |
on: | |
pull_request: | |
branches: | |
- develop | |
- release | |
- main | |
types: | |
- closed | |
jobs: | |
create-issue: | |
name: PR closed notification to slack | |
runs-on: ubuntu-latest | |
steps: | |
- name: Send closed PR notification | |
if: github.event.pull_request.merged != true | |
uses: Ilshidur/[email protected] | |
env: | |
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }} | |
DISCORD_USERNAME: WAPP_BOT | |
DISCORD_AVATAR: https://github.com/pknu-wap/WAPP/blob/main/image/icon.png?raw=true | |
DISCORD_EMBEDS: | | |
[ | |
{ | |
"author": { | |
"name": "${{ github.event.pull_request.user.login }}", | |
"url": "https://github.com/pknu-wap/WAPP/blob/main/image/icon.png?raw=true", | |
"icon_url": "${{ github.event.pull_request.user.avatar_url }}" | |
}, | |
"title": "PR이 닫혔습니다!\n#${{ github.event.pull_request.number }} : ${{ github.event.pull_request.title }}", | |
"color": 13458524, | |
"description": "${{ github.event.pull_request.html_url }}", | |
"fields": [ | |
{ | |
"name": "Base Branch", | |
"value": "${{ github.base_ref }}", | |
"inline": true | |
}, | |
{ | |
"name": "Compare Branch", | |
"value": "${{ github.head_ref }}", | |
"inline": true | |
} | |
] | |
} | |
] | |
- name: Send merged PR notification | |
if: github.event.pull_request.merged == true | |
uses: Ilshidur/[email protected] | |
env: | |
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }} | |
DISCORD_USERNAME: WAPP_BOT | |
DISCORD_AVATAR: https://github.com/pknu-wap/WAPP/blob/main/image/icon.png?raw=true | |
DISCORD_EMBEDS: | | |
[ | |
{ | |
"author": { | |
"name": "${{ github.event.pull_request.user.login }}", | |
"url": "https://github.com/pknu-wap/WAPP/blob/main/image/icon.png?raw=true", | |
"icon_url": "${{ github.event.pull_request.user.avatar_url }}" | |
}, | |
"title": "PR이 머지되었습니다! 👏\n#${{ github.event.pull_request.number }} : ${{ github.event.pull_request.title }}", | |
"color": 10478271, | |
"description": "${{ github.event.pull_request.html_url }}", | |
"fields": [ | |
{ | |
"name": "Base Branch", | |
"value": "${{ github.base_ref }}", | |
"inline": true | |
}, | |
{ | |
"name": "Compare Branch", | |
"value": "${{ github.head_ref }}", | |
"inline": true | |
} | |
] | |
} | |
] |