-
Notifications
You must be signed in to change notification settings - Fork 6
78 lines (73 loc) · 2.74 KB
/
issue-branch-pr-automation.yml
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
name: ALL/PM - Issue 자동 관리
on:
issues:
types: [assigned, closed]
jobs:
create-issue-branch:
name: "feature 이슈 할당 -> 브랜치-PR 자동 생성"
runs-on: ubuntu-latest
if: github.event.action == 'assigned'
steps:
- name: create the issue branch
uses: robvanderleek/[email protected]
id: create-issue-branch
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
notify-open-issue:
name: "이슈 작업 시작 -> Slack 체널 알림"
runs-on: ubuntu-latest
if: github.event.action == 'assigned'
steps:
- name: Set assignee variables
id: set-vars
run: |
ASSIGNEE_LOGIN=${{ github.event.issue.assignee.login }}
echo "ASSIGNEE_SLACK_ID=${ASSIGNEE_LOGIN@L}" >> ${GITHUB_ENV}
- name: 작업 시작 -> Slack 체널 알림
uses: slackapi/[email protected]
with:
channel-id: ${{ secrets.IN_PROGRESS_SLACK_CHANNEL_ID }}
payload: |
{
"text": "🔔 작업 시작 알림 🔔",
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "〰️〰〰️〰 \n🚀 작업 시작 \n <@${{ env.ASSIGNEE_SLACK_ID }}> 님이 \n <${{ github.event.issue.html_url }}|${{ github.event.issue.title }}> 작업을 시작했습니다!:muscle:"
}
}
]
}
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
notify-close-issue:
name: "이슈 작업 종료 -> Slack 체널 알림"
runs-on: ubuntu-latest
if: github.event.action == 'closed'
steps:
- name: Set assignee variables
id: set-vars
run: |
ASSIGNEE_LOGIN=${{ github.event.issue.assignee.login }}
echo "ASSIGNEE_SLACK_ID=${ASSIGNEE_LOGIN@L}" >> ${GITHUB_ENV}
- name: 작업 시작 -> Slack 체널 알림
uses: slackapi/[email protected]
with:
channel-id: ${{ secrets.TASK_COMPLETE_SLACK_CHANNEL_ID }}
payload: |
{
"text": "🎉 작업 완료 알림 🎉",
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "〰️〰〰️〰 \n:pushpin:작업 완료\n <@${{ env.ASSIGNEE_SLACK_ID }}> 님의 할당 이슈인 \n\n:confetti_ball: <${{ github.event.issue.html_url }}|${{ github.event.issue.title }}> 작업이 완료(종료)됐습니다! :confetti_ball:"
}
}
]
}
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}