-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (41 loc) · 2.06 KB
/
discord-notifier.yml
File metadata and controls
45 lines (41 loc) · 2.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
name: Discord Notifier
on:
pull_request:
types: [opened]
issues:
types: [opened]
jobs:
notify:
runs-on: ubuntu-latest
steps:
- name: Set Upper Case ID
run: |
ACTOR_NAME=$(echo "${{ github.actor }}" | tr '[:lower:]' '[:upper:]')
echo "ACTOR_UPPER=$ACTOR_NAME" >> $GITHUB_ENV
- name: Discord notification (PR)
if: ${{ github.event_name == 'pull_request' }}
uses: sarisia/actions-status-discord@v1
with:
webhook: ${{ secrets.DISCORD_WEBHOOK_URL }}
content: |
# 🚀 PR 생성: ${{ github.event.pull_request.title }}
담당자: ${{ secrets[format('ID_{0}', env.ACTOR_UPPER)] != '' && format('<@{0}>', secrets[format('ID_{0}', env.ACTOR_UPPER)]) || github.actor }}
title: "PR #${{ github.event.pull_request.number }} - ${{ github.event.pull_request.title }}"
description: |
**작성자:** ${{ github.actor }}
**브랜치:** ${{ github.head_ref }} -> ${{ github.base_ref }}
**링크:** ${{ github.event.pull_request.html_url }}
color: 0x5865F2
- name: Discord notification (Issue)
if: ${{ github.event_name == 'issues' }}
uses: sarisia/actions-status-discord@v1
with:
webhook: ${{ secrets.DISCORD_WEBHOOK_URL }}
content: |
# 📌 이슈 생성: ${{ github.event.issue.title }}
담당자: ${{ secrets[format('ID_{0}', env.ACTOR_UPPER)] != '' && format('<@{0}>', secrets[format('ID_{0}', env.ACTOR_UPPER)]) || github.actor }}
title: "Issue #${{ github.event.issue.number }} - ${{ github.event.issue.title }}"
description: |
**작성자:** ${{ github.actor }}
**링크:** ${{ github.event.issue.html_url }}
color: 0x5865F2