Skip to content

[BE] feat: ํ•™๊ต ๋ชฉ๋ก ์กฐํšŒ ๊ธฐ๋Šฅ ๊ตฌํ˜„ (#431) #189

[BE] feat: ํ•™๊ต ๋ชฉ๋ก ์กฐํšŒ ๊ธฐ๋Šฅ ๊ตฌํ˜„ (#431)

[BE] feat: ํ•™๊ต ๋ชฉ๋ก ์กฐํšŒ ๊ธฐ๋Šฅ ๊ตฌํ˜„ (#431) #189

name: Closed PR Notification
on:
pull_request:
branches:
- dev
- 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: slackapi/[email protected]
with:
payload: |
{
"text": "*PR์ด ๋‹ซํ˜”์Šต๋‹ˆ๋‹ค!*",
"attachments": [
{
"color": "#CF2027",
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "*Title*\n<${{ github.event.pull_request.html_url }}|${{ github.event.pull_request.title }}>"
}
},
{
"type": "section",
"fields": [
{
"type": "mrkdwn",
"text": "*Base branch*\n${{ github.base_ref }}"
},
{
"type": "mrkdwn",
"text": "*Compare branch*\n${{ github.head_ref }}"
},
{
"type": "mrkdwn",
"text": "*PR number*\n#${{ github.event.pull_request.number }}"
},
{
"type": "mrkdwn",
"text": "*Author*\n${{ github.event.pull_request.user.login }}"
}
]
}
]
}
]
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_PR_WEBHOOK_URL }}
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK
- name: Send merged PR notification
if: github.event.pull_request.merged == true
uses: slackapi/[email protected]
with:
payload: |
{
"text": "*PR์ด ๋จธ์ง€๋์Šต๋‹ˆ๋‹ค!*",
"attachments": [
{
"color": "#7539DE",
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "*Title*\n<${{ github.event.pull_request.html_url }}|${{ github.event.pull_request.title }}>"
}
},
{
"type": "section",
"fields": [
{
"type": "mrkdwn",
"text": "*Base branch*\n${{ github.base_ref }}"
},
{
"type": "mrkdwn",
"text": "*Compare branch*\n${{ github.head_ref }}"
},
{
"type": "mrkdwn",
"text": "*PR number*\n#${{ github.event.pull_request.number }}"
},
{
"type": "mrkdwn",
"text": "*Author*\n${{ github.event.pull_request.user.login }}"
}
]
}
]
}
]
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_PR_WEBHOOK_URL }}
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK