Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 52 additions & 0 deletions .github/ISSUE_TEMPLATE/issue_form.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: '이슈 생성'
description: 'Repo에 이슈를 생성하며, 생성된 이슈는 Jira와 연동됩니다.'
labels: [feat]
title: '이슈 이름을 작성해주세요'
body:
- type: input
id: parentKey
attributes:
label: '🎟️ 상위 작업 (Ticket Number)'
description: '상위 작업의 Ticket Number를 기입해주세요'
placeholder: 'THIP2025-00'
validations:
required: true

- type: dropdown
id: branchType
attributes:
label: '브랜치 타입'
options:
- feature
- bugfix
- hotfix
- refactor
validations:
required: true

- type: input
id: branch
attributes:
label: '🌳 브랜치명 (Branch)'
description: '영어로 브랜치명을 작성해주세요'
validations:
required: true

- type: input
id: description
attributes:
label: '📝 상세 내용(Description)'
description: '이슈에 대해서 간략히 설명해주세요'
validations:
required: true

- type: textarea
id: tasks
attributes:
label: '✅ 체크리스트(Tasks)'
description: '해당 이슈에 대해 필요한 작업목록을 작성해주세요'
value: |
- [ ] Task1
- [ ] Task2
validations:
required: true
41 changes: 41 additions & 0 deletions .github/workflows/close-jira-issue.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Close Jira issue
on:
issues:
types:
- closed

jobs:
close-issue:
name: Close Jira issue
runs-on: ubuntu-latest

steps:
- name: Login to Jira
uses: atlassian/gajira-login@v3
env:
JIRA_BASE_URL: ${{ secrets.JIRA_BASE_URL }}
JIRA_API_TOKEN: ${{ secrets.JIRA_API_TOKEN }}
JIRA_USER_EMAIL: ${{ secrets.JIRA_USER_EMAIL }}

- name: Extract Jira issue key from GitHub issue title
id: extract-key
run: |
ISSUE_TITLE="${{ github.event.issue.title }}"
CLEANED_TITLE=$(echo "$ISSUE_TITLE" | tr -d '[]')
echo "🧼 Cleaned title: $CLEANED_TITLE"

JIRA_KEY=$(echo "$CLEANED_TITLE" | grep -oE '[A-Z0-9]+-[0-9]+')

if [ -z "$JIRA_KEY" ]; then
echo "❌ JIRA key could not be extracted. Exiting."
exit 1
fi

echo "✅ Extracted JIRA_KEY=$JIRA_KEY"
echo "JIRA_KEY=$JIRA_KEY" >> $GITHUB_ENV

- name: Transition Jira issue to Done
uses: atlassian/gajira-transition@v3
with:
issue: ${{ env.JIRA_KEY }}
transition: 완료
91 changes: 91 additions & 0 deletions .github/workflows/create-jira-issue.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
name: Create Jira issue
on:
issues:
types:
- opened
jobs:
create-issue:
name: Create Jira issue
runs-on: ubuntu-latest
steps:
- name: Login
uses: atlassian/gajira-login@v3
env:
JIRA_BASE_URL: ${{ secrets.JIRA_BASE_URL }}
JIRA_API_TOKEN: ${{ secrets.JIRA_API_TOKEN }}
JIRA_USER_EMAIL: ${{ secrets.JIRA_USER_EMAIL }}

- name: Checkout main code
uses: actions/checkout@v4
with:
ref: main

- name: Issue Parser
uses: stefanbuck/github-issue-praser@v3
id: issue-parser
with:
template-path: .github/ISSUE_TEMPLATE/issue_form.yml

- name: Log Issue Parser
run: |
echo '${{ steps.issue-parser.outputs.issueparser_parentKey }}'
echo '${{ steps.issue-parser.outputs.__ticket_number }}'
echo '${{ steps.issue-parser.outputs.jsonString }}'

- name: Convert markdown to Jira Syntax
uses: peter-evans/jira2md@v1
id: md2jira
with:
input-text: |
### Github Issue Link
- ${{ github.event.issue.html_url }}

${{ github.event.issue.body }}
mode: md2jira

- name: Create Issue
id: create
uses: atlassian/gajira-create@v3
with:
project: THIP2025
issuetype: Task
summary: '${{ github.event.issue.title }}'
description: '${{ steps.md2jira.outputs.output-text }}'
fields: |
{
"parent": {
"key": "${{ steps.issue-parser.outputs.issueparser_parentKey }}"
}
}

- name: Log created issue
run: echo "Jira Issue ${{ steps.issue-parser.outputs.parentKey }}/${{ steps.create.outputs.issue }} was created"

- name: Checkout develop code
uses: actions/checkout@v4
with:
ref: develop

- name: Create branch with Ticket number
run: |
ISSUE_NUMBER="${{ steps.create.outputs.issue }}"
BRANCH_TYPE="${{ steps.issue-parser.outputs.issueparser_branchType }}"
ISSUE_TITLE="${{ steps.issue-parser.outputs.issueparser_branch }}"
BRANCH_NAME="${BRANCH_TYPE}/${ISSUE_NUMBER}-$(echo ${ISSUE_TITLE} | sed 's/ /-/g')"
git checkout -b "${BRANCH_NAME}"
git push origin "${BRANCH_NAME}"

- name: Update issue title
uses: actions-cool/issues-helper@v3
with:
actions: 'update-issue'
token: ${{ secrets.GITHUB_TOKEN }}
title: '[${{ steps.create.outputs.issue }}] ${{ github.event.issue.title }}'

- name: Add comment with Jira issue link
uses: actions-cool/issues-helper@v3
with:
actions: 'create-comment'
token: ${{ secrets.GITHUB_TOKEN }}
issue-number: ${{ github.event.issue.number }}
body: 'Jira Issue Created: [${{ steps.create.outputs.issue }}](${{ secrets.JIRA_BASE_URL }}/browse/${{ steps.create.outputs.issue }})'
6 changes: 6 additions & 0 deletions .idea/AndroidProjectSystem.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 26 additions & 0 deletions .idea/appInsightsSettings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions .idea/deploymentTargetSelector.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 19 additions & 0 deletions .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

61 changes: 61 additions & 0 deletions .idea/inspectionProfiles/Project_Default.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/kotlinc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions .idea/migrations.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 1 addition & 3 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 17 additions & 0 deletions .idea/runConfigurations.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading