Skip to content

Commit 7062aad

Browse files
authored
pr 오픈 시 알림 생성
1 parent b7b026c commit 7062aad

1 file changed

Lines changed: 49 additions & 0 deletions

File tree

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Notify Slack on Pull Request Upload
2+
3+
on:
4+
pull_request:
5+
types: [opened]
6+
7+
jobs:
8+
slack_notification:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Send Slack notification
12+
uses: slackapi/slack-github-action@v1.27.0
13+
with:
14+
payload: |
15+
{
16+
"text": ":bell: *New Pull Request!*",
17+
"blocks": [
18+
{
19+
"type": "section",
20+
"text": {
21+
"type": "mrkdwn",
22+
"text": ":sparkles: *${{ github.actor }}* opened a PR"
23+
}
24+
},
25+
{
26+
"type": "section",
27+
"fields": [
28+
{
29+
"type": "mrkdwn",
30+
"text": "*Title:*\n${{ github.event.pull_request.title }}"
31+
},
32+
{
33+
"type": "mrkdwn",
34+
"text": "*Base Branch:*\n${{ github.base_ref }}"
35+
},
36+
{
37+
"type": "mrkdwn",
38+
"text": "*From Branch:*\n${{ github.head_ref }}"
39+
},
40+
{
41+
"type": "mrkdwn",
42+
"text": "*Link:*\n<${{ github.event.pull_request.html_url }}|View PR>"
43+
}
44+
]
45+
}
46+
]
47+
}
48+
env:
49+
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}

0 commit comments

Comments
 (0)