Skip to content

Commit 8fc6238

Browse files
committed
chore: 초기 셋팅
1 parent 459cc5a commit 8fc6238

File tree

7 files changed

+331
-1
lines changed

7 files changed

+331
-1
lines changed
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: '이슈 생성'
2+
description: 'GitHub에서 이슈를 생성하면 Jira에 Sub-task가 자동 생성되고, 상위 이슈에 연결됩니다.'
3+
labels: [feat]
4+
title: '이슈 이름을 작성해주세요'
5+
body:
6+
- type: input
7+
id: parentKey
8+
attributes:
9+
label: '🎟️ 상위 이슈 키'
10+
description: '연결할 상위 이슈의 Ticket Number를 입력해 주세요 (예: GUC-27)'
11+
placeholder: 'GUC-00'
12+
validations:
13+
required: true
14+
15+
- type: dropdown
16+
id: branchType
17+
attributes:
18+
label: '📂 브랜치 타입'
19+
description: '기능 타입을 선택하세요'
20+
options:
21+
- feat
22+
- fix
23+
- hotfix
24+
- refactor
25+
- test
26+
validations:
27+
required: true
28+
29+
- type: input
30+
id: branch
31+
attributes:
32+
label: '🌳 브랜치명 (Branch)'
33+
description: '영어로 브랜치명을 작성해 주세요'
34+
validations:
35+
required: true
36+
37+
- type: input
38+
id: description
39+
attributes:
40+
label: '📝 상세 내용(Description)'
41+
description: '이슈에 대해서 간략히 설명해 주세요'
42+
validations:
43+
required: true
44+
45+
- type: textarea
46+
id: tasks
47+
attributes:
48+
label: '✅ 체크리스트(Tasks)'
49+
description: '이 작업에서 수행해야 할 내용을 작성해 주세요'
50+
value: |
51+
- [ ] 작업 항목 1
52+
- [ ] 작업 항목 2
53+
validations:
54+
required: true

.github/pull_request_template.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
## 📌 Jira Issue
2+
3+
- 관련 티켓: [GUC-XX](https://sh0314.atlassian.net/browse/GUC-XX)
4+
- 관련 GitHub 이슈: #XX
5+
6+
---
7+
8+
## ✨ PR Description
9+
10+
- 변경 사항 설명:
11+
- 여기에 어떤 변경을 했는지 설명해주세요
12+
- ex) 로그인 성공 시 홈으로 리디렉션되도록 수정함
13+
14+
---
15+
16+
## 📝 Requirements for Reviewer
17+
18+
- 리뷰어가 특별히 봐줬으면 하는 부분이 있다면 여기에 적어주세요
19+
- ex) 메서드 `handleLoginRedirect()` 명칭 괜찮은지 봐주세요
20+
- ex) 코드 로직 중 `line 45~56` 성능 개선 가능할지 궁금합니다
21+
22+
---
23+
24+
## ✅ 체크리스트
25+
26+
- [ ] Jira 티켓 번호를 커밋 메시지에 포함했는가?
27+
- [ ] GitHub 이슈에 `resolves: #번호`를 추가했는가?
28+
- [ ] 불필요한 주석, 디버깅 코드 제거했는가?
29+
- [ ] 기능 테스트 및 정상 동작 확인했는가?
30+
31+
---
32+
33+
## 📸 스크린샷 (선택)
34+
35+
> UI 변경 사항이 있다면 여기에 첨부해주세요 (Drag & Drop 가능)
36+
37+
---
38+
39+
## 🔍 기타 참고사항
40+
41+
> 리뷰어에게 공유하고 싶은 추가 정보가 있다면 여기에 작성해주세요
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Close Jira Issue
2+
3+
on:
4+
issues:
5+
types: [closed]
6+
7+
jobs:
8+
transition-jira:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- name: Jira 로그인
13+
uses: atlassian/gajira-login@v3
14+
env:
15+
JIRA_BASE_URL: ${{ secrets.JIRA_BASE_URL }}
16+
JIRA_USER_EMAIL: ${{ secrets.JIRA_USER_EMAIL }}
17+
JIRA_API_TOKEN: ${{ secrets.JIRA_API_TOKEN }}
18+
19+
20+
- name: Jira 상태 변경 (Done)
21+
run: |
22+
TITLE="${{ github.event.issue.title }}"
23+
ISSUE_KEY=$(echo "$TITLE" | grep -oE '[A-Z]+-[0-9]+')
24+
echo "Jira Issue Key: $ISSUE_KEY"
25+
26+
echo "ISSUE_KEY=$ISSUE_KEY" >> $GITHUB_ENV
27+
28+
- name: Transition to Done
29+
if: env.ISSUE_KEY != ''
30+
uses: atlassian/gajira-transition@v3
31+
with:
32+
issue: ${{ env.ISSUE_KEY }}
33+
transition: 완료
Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
name: Create Jira Story from GitHub Issue
2+
3+
on:
4+
issues:
5+
types: [opened]
6+
7+
jobs:
8+
create-jira-issue:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- name: main 브랜치 체크아웃
13+
uses: actions/checkout@v4
14+
with:
15+
ref: main
16+
17+
- name: Jira 로그인
18+
uses: atlassian/gajira-login@v3
19+
env:
20+
JIRA_BASE_URL: ${{ secrets.JIRA_BASE_URL }}
21+
JIRA_USER_EMAIL: ${{ secrets.JIRA_USER_EMAIL }}
22+
JIRA_API_TOKEN: ${{ secrets.JIRA_API_TOKEN }}
23+
24+
- name: 이슈 템플릿 파싱
25+
uses: stefanbuck/github-issue-parser@v3
26+
id: issue-parser
27+
with:
28+
template-path: .github/ISSUE_TEMPLATE/issue-form.yml
29+
30+
- name: 마크다운 → Jira 문법 변환
31+
uses: peter-evans/jira2md@v1
32+
id: md2jira
33+
with:
34+
input-text: |
35+
### GitHub Issue
36+
- ${{ github.event.issue.html_url }}
37+
38+
${{ github.event.issue.body }}
39+
mode: md2jira
40+
41+
- name: Jira 이슈 생성
42+
id: create
43+
uses: atlassian/gajira-create@v3
44+
with:
45+
project: GUC
46+
issuetype: Story
47+
summary: '${{ github.event.issue.title }}'
48+
description: '${{ steps.md2jira.outputs.output-text }}'
49+
fields: |
50+
{
51+
"parent": {
52+
"key": "${{ steps.issue-parser.outputs.issueparser_parentKey }}"
53+
}
54+
}
55+
56+
- name: 브랜치 생성 및 푸시
57+
env:
58+
GH_PAT: ${{ secrets.GH_PAT }}
59+
run: |
60+
ISSUE_NUMBER="${{ steps.create.outputs.issue }}"
61+
BRANCH_TYPE="${{ steps.issue-parser.outputs.issueparser_branchType }}"
62+
BRANCH_NAME_INPUT="${{ steps.issue-parser.outputs.issueparser_branch }}"
63+
SANITIZED_INPUT=$(echo "${BRANCH_NAME_INPUT}" | tr '[:upper:]' '[:lower:]' | sed 's/ /-/g' | sed 's/[^a-z0-9\\-]//g')
64+
BRANCH_NAME="${BRANCH_TYPE}/${ISSUE_NUMBER}-${SANITIZED_INPUT}"
65+
66+
git config user.name "github-actions"
67+
git config user.email "actions@github.com"
68+
69+
git checkout -b "${BRANCH_NAME}"
70+
git push "https://x-access-token:${GH_PAT}@github.com/${{ github.repository }}.git" "${BRANCH_NAME}"
71+
72+
- name: GitHub 이슈 제목 업데이트
73+
uses: actions-cool/issues-helper@v3
74+
with:
75+
actions: 'update-issue'
76+
token: ${{ secrets.GITHUB_TOKEN }}
77+
title: '[${{ steps.create.outputs.issue }}] ${{ github.event.issue.title }}'
78+
79+
- name: Jira 링크 코멘트 남기기
80+
uses: actions-cool/issues-helper@v3
81+
with:
82+
actions: 'create-comment'
83+
token: ${{ secrets.GITHUB_TOKEN }}
84+
issue-number: ${{ github.event.issue.number }}
85+
body: '📌 Jira Ticket: [${{ steps.create.outputs.issue }}](${{ secrets.JIRA_BASE_URL }}/browse/${{ steps.create.outputs.issue }})'

.github/workflows/deploy.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: Deploy
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
7+
jobs:
8+
deploy:
9+
uses: Gachon-Univ-Creative-Code-Innovation/infra-configs/.github/workflows/java-deploy.yml@main
10+
with:
11+
service: user-service
12+
tag: ${{ github.sha }} # 마지막 커밋 해쉬
13+
secrets:
14+
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
15+
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}

.gitignore

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# dependencies
2+
/node_modules
3+
4+
# production build
5+
/build
6+
7+
# misc
8+
.DS_Store
9+
.env
10+
.env.local
11+
.env.development.local
12+
.env.test.local
13+
.env.production.local
14+
15+
# testing
16+
/coverage
17+
18+
# IDEs and editors
19+
.vscode/
20+
.idea/
21+
*.suo
22+
*.ntvs*
23+
*.njsproj
24+
*.sln
25+
26+
# logs
27+
npm-debug.log*
28+
yarn-debug.log*
29+
yarn-error.log*
30+
pnpm-debug.log*
31+
32+
# OS-specific
33+
Thumbs.db
34+
ehthumbs.db
35+
Desktop.ini
36+
37+
# parcel-bundler cache (if used)
38+
/.cache
39+
40+
# Optional: local SSL certs
41+
*.pem

README.md

Lines changed: 62 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,62 @@
1-
# front
1+
# FE
2+
Alog의 프론트엔드 레포지토리
3+
## 🧷 Git 작업 컨벤션 (Branch / Commit / PR)
4+
5+
### 📂 브랜치 네이밍 규칙
6+
7+
예시:
8+
- `feat/GUC-31-login-api`
9+
- `fix/GUC-27-comment-delete-bug`
10+
- `test/GUC-40-user-service-test`
11+
12+
**타입 목록:**
13+
14+
| 타입 | 설명 |
15+
|------------|----------------------------|
16+
| `feat` | 새로운 기능 추가 |
17+
| `fix` | 버그 수정 |
18+
| `refactor` | 리팩토링 (기능 변경 없이 코드 개선) |
19+
| `test` | 테스트 코드 관련 |
20+
| `hotfix` | 긴급 수정 |
21+
22+
---
23+
24+
### 💬 커밋 메시지 컨벤션
25+
26+
예시:
27+
```
28+
feat: 로그인 성공 시 홈 리디렉션 구현
29+
30+
- 로그인 성공 시 api/home 으로 이동
31+
32+
JIRA: GUC-31
33+
resolves: #12
34+
```
35+
36+
> 🔹 `JIRA: GUC-31` → Jira 티켓 번호 명시 (연동 시 자동 링크 가능)
37+
> 🔹 `resolves: #12` → PR 머지 시 GitHub 이슈 자동 닫힘
38+
39+
40+
**타입 목록:**
41+
42+
| 타입 | 설명 |
43+
|-------------------|-------------------------------------------------------|
44+
| `feat` | 새로운 기능 추가 |
45+
| `fix` | 버그 수정 |
46+
| `refactor` | 리팩토링 (기능 변경 없이 코드 개선) |
47+
| `test` | 테스트 코드 관련 |
48+
| `style` | 코드 포맷팅, 세미콜론 누락, 코드 변경이 없는 경우 |
49+
| `chore` | 빌드 설정 등 코드가 아닌 유지 보수 관련된 작업 |
50+
| `docs` | 문서 수정 |
51+
| `BREAKING CHANGE` | 기존 기능을 크게 변경했을 때 </br> 다른 부분에 영향을 미치는 중요한 변경 사항이 있을 때 |
52+
53+
---
54+
55+
### 🔁 작업 프로세스 요약
56+
57+
1. GitHub 이슈 생성 시 → Jira 티켓 & 브랜치 자동 생성
58+
2. 브랜치로 이동해 작업 수행
59+
3. 커밋 시 `JIRA`, `resolves` 포함
60+
4. PR 작성 → 템플릿에 맞춰 작성
61+
5. PR 머지 시 → GitHub 이슈 자동 닫힘
62+
6. 이슈 닫힘 시 → Jira 상태 자동 변경 (완료)

0 commit comments

Comments
 (0)