Skip to content

Commit 0e86866

Browse files
authored
Merge pull request #8 from YAPP-Github/chore/issue-template
[Chore] 이슈 템플릿 추가
2 parents bec3c67 + 5de185e commit 0e86866

File tree

10 files changed

+341
-1
lines changed

10 files changed

+341
-1
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: "Feat Template"
2+
description: 기타 이슈 템플릿
3+
labels: [ feat ]
4+
title: '[Feat] '
5+
body:
6+
- type: input
7+
id: parentKey
8+
attributes:
9+
label: '🏷️ 상위 작업 (Ticket Number)'
10+
description: '상위 작업의 Ticket Number를 기입해주세요'
11+
placeholder: 'PRODUCT-000'
12+
validations:
13+
required: true
14+
15+
- type: textarea
16+
id: details
17+
attributes:
18+
label: '🚀 구현 내용'
19+
description: '이슈에 대해서 자세히 설명해주세요'
20+
value: |
21+
-
22+
validations:
23+
required: true
24+
25+
- type: input
26+
id: dueDate
27+
attributes:
28+
label: '📅 마감일'
29+
description: '마감일을 입력해주세요 (YY.MM.DD)'
30+
placeholder: ''
31+
validations:
32+
required: false
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: "Fix Template"
2+
description: 수정 이슈 템플릿
3+
labels: [ fix ]
4+
title: '[Fix] '
5+
body:
6+
- type: input
7+
id: parentKey
8+
attributes:
9+
label: '🏷️ 상위 작업 (Ticket Number)'
10+
description: '상위 작업의 Ticket Number를 기입해주세요'
11+
placeholder: 'PRODUCT-000'
12+
validations:
13+
required: true
14+
15+
- type: textarea
16+
id: details
17+
attributes:
18+
label: '🚀 구현 내용'
19+
description: '이슈에 대해서 자세히 설명해주세요'
20+
value: |
21+
-
22+
validations:
23+
required: true
24+
25+
- type: input
26+
id: dueDate
27+
attributes:
28+
label: '📅 마감일'
29+
description: '마감일을 입력해주세요 (YY.MM.DD)'
30+
placeholder: ''
31+
validations:
32+
required: false
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: "Hotfix Template"
2+
description: 핫픽스 이슈 템플릿
3+
labels: [ hotfix ]
4+
title: '[Hotfix] '
5+
body:
6+
- type: input
7+
id: parentKey
8+
attributes:
9+
label: '🏷️ 상위 작업 (Ticket Number)'
10+
description: '상위 작업의 Ticket Number를 기입해주세요'
11+
placeholder: 'PRODUCT-000'
12+
validations:
13+
required: true
14+
15+
- type: textarea
16+
id: details
17+
attributes:
18+
label: '🚀 구현 내용'
19+
description: '이슈에 대해서 자세히 설명해주세요'
20+
value: |
21+
-
22+
validations:
23+
required: true
24+
25+
- type: input
26+
id: dueDate
27+
attributes:
28+
label: '📅 마감일'
29+
description: '마감일을 입력해주세요 (YY.MM.DD)'
30+
placeholder: ''
31+
validations:
32+
required: false
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: "Docs Template"
2+
description: 문서화 이슈 템플릿
3+
labels: [ docs ]
4+
title: '[Docs] '
5+
body:
6+
- type: input
7+
id: parentKey
8+
attributes:
9+
label: '🏷️ 상위 작업 (Ticket Number)'
10+
description: '상위 작업의 Ticket Number를 기입해주세요'
11+
placeholder: 'PRODUCT-000'
12+
validations:
13+
required: true
14+
15+
- type: textarea
16+
id: details
17+
attributes:
18+
label: '🚀 구현 내용'
19+
description: '이슈에 대해서 자세히 설명해주세요'
20+
value: |
21+
-
22+
validations:
23+
required: true
24+
25+
- type: input
26+
id: dueDate
27+
attributes:
28+
label: '📅 마감일'
29+
description: '마감일을 입력해주세요 (YY.MM.DD)'
30+
placeholder: ''
31+
validations:
32+
required: false
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: "Refactor Template"
2+
description: 리팩토링 이슈 템플릿
3+
labels: [ refactor ]
4+
title: '[Refactor] '
5+
body:
6+
- type: input
7+
id: parentKey
8+
attributes:
9+
label: '🏷️ 상위 작업 (Ticket Number)'
10+
description: '상위 작업의 Ticket Number를 기입해주세요'
11+
placeholder: 'PRODUCT-000'
12+
validations:
13+
required: true
14+
15+
- type: textarea
16+
id: details
17+
attributes:
18+
label: '🚀 구현 내용'
19+
description: '이슈에 대해서 자세히 설명해주세요'
20+
value: |
21+
-
22+
validations:
23+
required: true
24+
25+
- type: input
26+
id: dueDate
27+
attributes:
28+
label: '📅 마감일'
29+
description: '마감일을 입력해주세요 (YY.MM.DD)'
30+
placeholder: ''
31+
validations:
32+
required: false
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: "Test Template"
2+
description: 테스트 이슈 템플릿
3+
labels: [ test ]
4+
title: '[Test] '
5+
body:
6+
- type: input
7+
id: parentKey
8+
attributes:
9+
label: '🏷️ 상위 작업 (Ticket Number)'
10+
description: '상위 작업의 Ticket Number를 기입해주세요'
11+
placeholder: 'PRODUCT-000'
12+
validations:
13+
required: true
14+
15+
- type: textarea
16+
id: details
17+
attributes:
18+
label: '🚀 구현 내용'
19+
description: '이슈에 대해서 자세히 설명해주세요'
20+
value: |
21+
-
22+
validations:
23+
required: true
24+
25+
- type: input
26+
id: dueDate
27+
attributes:
28+
label: '📅 마감일'
29+
description: '마감일을 입력해주세요 (YY.MM.DD)'
30+
placeholder: ''
31+
validations:
32+
required: false
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: "Infra Template"
2+
description: 기타 이슈 템플릿
3+
labels: [ chore ]
4+
title: '[Chore] '
5+
body:
6+
- type: input
7+
id: parentKey
8+
attributes:
9+
label: '🏷️ 상위 작업 (Ticket Number)'
10+
description: '상위 작업의 Ticket Number를 기입해주세요'
11+
placeholder: 'PRODUCT-000'
12+
validations:
13+
required: true
14+
15+
- type: textarea
16+
id: details
17+
attributes:
18+
label: '🚀 구현 내용'
19+
description: '이슈에 대해서 자세히 설명해주세요'
20+
value: |
21+
-
22+
validations:
23+
required: true
24+
25+
- type: input
26+
id: dueDate
27+
attributes:
28+
label: '📅 마감일'
29+
description: '마감일을 입력해주세요 (YY.MM.DD)'
30+
placeholder: ''
31+
validations:
32+
required: false
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: "CI Template"
2+
description: CI 설정 이슈 템플릿
3+
labels: [ chore ]
4+
title: '[Chore] '
5+
body:
6+
- type: input
7+
id: parentKey
8+
attributes:
9+
label: '🏷️ 상위 작업 (Ticket Number)'
10+
description: '상위 작업의 Ticket Number를 기입해주세요'
11+
placeholder: 'PRODUCT-000'
12+
validations:
13+
required: true
14+
15+
- type: textarea
16+
id: details
17+
attributes:
18+
label: '🚀 구현 내용'
19+
description: '이슈에 대해서 자세히 설명해주세요'
20+
value: |
21+
-
22+
validations:
23+
required: true
24+
25+
- type: input
26+
id: dueDate
27+
attributes:
28+
label: '📅 마감일'
29+
description: '마감일을 입력해주세요 (YY.MM.DD)'
30+
placeholder: ''
31+
validations:
32+
required: false

.github/config/pr-labeler-config.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
fix:
2-
- head-branch: ['^fix/', '^bugfix/', '^hotfix/']
2+
- head-branch: ['^fix/', '^bugfix/']
3+
4+
hotfix:
5+
- head-branch: ['^hotfix/']
36

47
feat:
58
- head-branch: ['^feat/', '^feature/']
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
name: Create Jira issue
2+
on:
3+
issues:
4+
types:
5+
- opened
6+
jobs:
7+
create-issue:
8+
name: Create Jira issue
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Login
12+
uses: atlassian/gajira-login@v3
13+
env:
14+
JIRA_BASE_URL: ${{ secrets.JIRA_BASE_URL }}
15+
JIRA_API_TOKEN: ${{ secrets.JIRA_API_TOKEN }}
16+
JIRA_USER_EMAIL: ${{ secrets.JIRA_USER_EMAIL }}
17+
18+
- name: Checkout main code
19+
uses: actions/checkout@v4
20+
with:
21+
ref: main
22+
23+
- name: Issue Parser
24+
uses: stefanbuck/github-issue-parser@v3
25+
id: issue-parser
26+
with:
27+
template-path: .github/ISSUE_TEMPLATE/01-feat-template.yml
28+
29+
- name: Log Issue Parser
30+
run: |
31+
echo '${{ steps.issue-parser.outputs.jsonString }}'
32+
33+
- name: Convert markdown to Jira Syntax
34+
uses: peter-evans/jira2md@v1
35+
id: md2jira
36+
with:
37+
input-text: |
38+
### Github Issue Link
39+
- ${{ github.event.issue.html_url }}
40+
41+
${{ github.event.issue.body }}
42+
mode: md2jira
43+
44+
- name: Create Issue
45+
id: create
46+
uses: atlassian/gajira-create@v3
47+
with:
48+
project: PRODUCT
49+
issuetype: Task
50+
summary: "${{ github.event.issue.title }}"
51+
description: "${{ steps.md2jira.outputs.output-text }}"
52+
fields: |
53+
{
54+
"parent": {
55+
"key": "${{ steps.issue-parser.outputs.issueparser_parentKey }}"
56+
}
57+
}
58+
59+
- name: Log created issue
60+
run: echo "Jira Issue ${{ steps.issue-parser.outputs.parentKey }}/${{ steps.create.outputs.issue }} was created"
61+
62+
- name: Get first label as branch prefix
63+
id: label
64+
run: |
65+
PREFIX=$(echo '${{ toJson(github.event.issue.labels) }}' | jq -r '.[0].name // "feat"')
66+
echo "prefix=$PREFIX" >> $GITHUB_OUTPUT
67+
68+
- name: Create branch with Ticket number
69+
run: |
70+
BRANCH_PREFIX="${{ steps.label.outputs.prefix }}"
71+
ISSUE_NUMBER="${{ steps.create.outputs.issue }}"
72+
BRANCH_NAME="${BRANCH_PREFIX}/${ISSUE_NUMBER}"
73+
git checkout -b "${BRANCH_NAME}"
74+
git push origin "${BRANCH_NAME}"
75+
76+
- name: Update issue title
77+
uses: actions-cool/issues-helper@v3
78+
with:
79+
actions: "update-issue"
80+
token: ${{ secrets.GITHUB_TOKEN }}
81+
title: "[${{ steps.create.outputs.issue }}] ${{ github.event.issue.title }}"

0 commit comments

Comments
 (0)