-
Notifications
You must be signed in to change notification settings - Fork 2
[chore] Claude Code 개발 플로우 자동화 설정 추가 #160
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
zerochani
wants to merge
2
commits into
develop
Choose a base branch
from
chore/#159-claude-dev-flow-automation
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,278 @@ | ||
| # GitHub 이슈 생성 가이드 | ||
|
|
||
| **모든 개발 작업은 반드시 GitHub 이슈를 먼저 생성하고 시작합니다!** | ||
|
|
||
| --- | ||
|
|
||
| ## 📋 이슈 템플릿 선택 | ||
|
|
||
| Eatsfine 프로젝트는 3가지 이슈 템플릿을 제공합니다: | ||
|
|
||
| ### 1. Feature Request (기능 추가) | ||
| **파일**: `.github/ISSUE_TEMPLATE/feature_request.yml` | ||
|
|
||
| **사용 시점**: | ||
| - 새로운 기능 개발 | ||
| - 기존 기능 확장 | ||
|
|
||
| **예시**: | ||
| - 예약 취소 기능 추가 | ||
| - OAuth 소셜 로그인 추가 | ||
| - 식당 검색 필터 추가 | ||
|
|
||
| --- | ||
|
|
||
| ### 2. Bug Report (버그 수정) | ||
| **파일**: `.github/ISSUE_TEMPLATE/bug_report.yml` | ||
|
|
||
| **사용 시점**: | ||
| - 기능 오류 수정 | ||
| - 예외 처리 누락 | ||
| - 데이터 정합성 문제 | ||
|
|
||
| **예시**: | ||
| - 예약 내역 조회 시 500 에러 발생 | ||
| - 결제 취소 시 환불 금액 계산 오류 | ||
| - JWT 토큰 만료 시 무한 리다이렉트 | ||
|
|
||
| --- | ||
|
|
||
| ### 3. Refactor Template (리팩토링) | ||
| **파일**: `.github/ISSUE_TEMPLATE/refactor_template.yml` | ||
|
|
||
| **사용 시점**: | ||
| - 코드 구조 개선 | ||
| - 성능 최적화 | ||
| - 아키텍처 패턴 적용 | ||
|
|
||
| **예시**: | ||
| - StoreService CQRS 패턴 적용 | ||
| - N+1 쿼리 문제 해결 | ||
| - 중복 코드 제거 | ||
|
|
||
| --- | ||
|
|
||
| ## 📝 Feature 이슈 작성 예시 | ||
|
|
||
| ### Title | ||
| ``` | ||
| [FEAT]: 예약 취소 및 환불 기능 구현 | ||
| ``` | ||
|
|
||
| ### 📄 설명 | ||
| ```markdown | ||
| 사용자가 예약을 취소하고 환불받을 수 있는 기능을 구현합니다. | ||
|
|
||
| **요구사항**: | ||
| - 예약 24시간 전까지 취소 가능 | ||
| - 취소 사유 필수 입력 | ||
| - 결제 금액 자동 환불 (Toss Payments) | ||
| - 본인만 취소 가능 (권한 검증) | ||
| - 취소된 예약은 상태가 CANCELED로 변경 | ||
| ``` | ||
|
|
||
| ### ✅ 작업할 내용 | ||
| ```markdown | ||
| - [ ] `CancelBookingRequest` DTO 작성 | ||
| - cancelReason: String (필수) | ||
| - [ ] `BookingCommandService.cancelBooking()` 메서드 구현 | ||
| - 취소 권한 검증 (본인 확인) | ||
| - 취소 가능 시간 검증 (24시간 전) | ||
| - 예약 상태 CANCELED로 변경 | ||
| - [ ] `TossPaymentService.cancelPayment()` 연동 | ||
| - 결제 환불 로직 | ||
| - 환불 실패 시 롤백 처리 | ||
| - [ ] `BookingController.cancelBooking()` API 구현 | ||
| - PATCH `/api/v1/bookings/{bookingId}/cancel` | ||
| - @CurrentUser 인증 필수 | ||
| - [ ] 단위 테스트 작성 | ||
| - 정상 취소 케이스 | ||
| - 권한 없는 사용자 케이스 | ||
| - 취소 불가 시간 케이스 | ||
| - 결제 환불 실패 케이스 | ||
| - [ ] Swagger 문서화 | ||
| - @Operation, @ApiResponses 추가 | ||
| ``` | ||
|
|
||
| ### 🙋🏻 참고 자료 | ||
| ```markdown | ||
| - Toss Payments 결제 취소 API: https://docs.tosspayments.com/reference#결제-취소 | ||
| - 관련 프론트 이슈: #120 | ||
| ``` | ||
|
|
||
| --- | ||
|
|
||
| ## 🐛 Bug Report 이슈 작성 예시 | ||
|
|
||
| ### Title | ||
| ``` | ||
| [BUG]: 예약 내역 조회 시 500 에러 발생 | ||
| ``` | ||
|
|
||
| ### 🐛 버그 설명 | ||
| ```markdown | ||
| 사용자가 마이페이지에서 예약 내역을 조회할 때 500 Internal Server Error가 발생합니다. | ||
| ``` | ||
|
|
||
| ### 🔄 재현 방법 | ||
| ```markdown | ||
| 1. 로그인 후 마이페이지 접속 | ||
| 2. "내 예약" 메뉴 클릭 | ||
| 3. 500 에러 발생 (예약 목록이 표시되지 않음) | ||
| ``` | ||
|
|
||
| ### ✅ 예상 동작 | ||
| ```markdown | ||
| 사용자의 예약 내역 목록이 정상적으로 표시되어야 합니다. | ||
| ``` | ||
|
|
||
| ### ❌ 실제 동작 | ||
| ```markdown | ||
| 500 서버 에러가 발생하고 예약 내역을 불러올 수 없습니다. | ||
| ``` | ||
|
|
||
| ### 📸 스크린샷 / 로그 | ||
| ```markdown | ||
| **에러 로그**: | ||
| ``` | ||
| org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: com.eatsfine.domain.booking.entity.Booking.bookingTables | ||
| ``` | ||
|
|
||
| **스택 트레이스**: | ||
| at com.eatsfine.domain.booking.service.BookingQueryServiceImpl.getBookingList(BookingQueryServiceImpl.java:45) | ||
| ``` | ||
| ``` | ||
|
|
||
| ### 🔍 원인 분석 | ||
| ```markdown | ||
| `BookingQueryServiceImpl.getBookingList()` 메서드에 `@Transactional(readOnly = true)` 어노테이션이 누락되어 Lazy Loading 시 LazyInitializationException이 발생합니다. | ||
| ``` | ||
|
|
||
| ### 🙋🏻 참고 자료 | ||
| ```markdown | ||
| - 관련 커밋: ba3ece4 | ||
| - 프론트엔드 이슈: #155 | ||
| ``` | ||
|
|
||
| --- | ||
|
|
||
| ## 🔧 Refactor 이슈 작성 예시 | ||
|
|
||
| ### Title | ||
| ``` | ||
| [REFACTOR]: StoreService CQRS 패턴 적용 | ||
| ``` | ||
|
|
||
| ### 🔍 리팩토링 사유 | ||
| ```markdown | ||
| 현재 `StoreService`가 조회와 명령 로직을 모두 포함하고 있어 책임이 과중합니다. CQRS 패턴을 적용하여 조회(Query)와 명령(Command) 로직을 분리하면 다음과 같은 이점이 있습니다: | ||
|
|
||
| - 책임 분리로 코드 가독성 향상 | ||
| - 조회 로직에 `@Transactional(readOnly = true)` 적용 가능 | ||
| - 성능 최적화 가능 (조회와 명령 독립적으로) | ||
| - 테스트 작성 용이 | ||
| ``` | ||
|
|
||
| ### 📄 리팩토링 상세 내용 | ||
| ```markdown | ||
| **변경 전**: | ||
| ```java | ||
| StoreService | ||
| - createStore() | ||
| - updateStore() | ||
| - deleteStore() | ||
| - findById() | ||
| - search() | ||
| ``` | ||
|
|
||
| **변경 후**: | ||
| ```java | ||
| StoreCommandService (인터페이스) | ||
| └── StoreCommandServiceImpl | ||
| - createStore() | ||
| - updateStore() | ||
| - deleteStore() | ||
|
|
||
| StoreQueryService (인터페이스) | ||
| └── StoreQueryServiceImpl | ||
| - findById() | ||
| - search() | ||
| - getStoreDetail() | ||
| ``` | ||
|
|
||
| **작업 내용**: | ||
| - [ ] `StoreCommandService` 인터페이스 및 구현체 생성 | ||
| - [ ] `StoreQueryService` 인터페이스 및 구현체 생성 | ||
| - [ ] 기존 `StoreService` 로직 이동 | ||
| - [ ] Controller에서 서비스 주입 변경 | ||
| - [ ] 기존 테스트 수정 | ||
| - [ ] 새로운 테스트 추가 | ||
| ``` | ||
|
|
||
| --- | ||
|
|
||
| ## 🚀 이슈 생성 후 | ||
|
|
||
| ### 1. 이슈 번호 확인 | ||
| 이슈를 생성하면 `#123`과 같은 번호를 받습니다. | ||
|
|
||
| ### 2. 브랜치 생성 | ||
| ```bash | ||
| git checkout -b feat/#123-cancel-booking | ||
| ``` | ||
|
|
||
| ### 3. 작업 시작 | ||
| ```bash | ||
| /start | ||
| ``` | ||
|
|
||
| --- | ||
|
|
||
| ## 💡 이슈 작성 팁 | ||
|
|
||
| ### 체크리스트 세분화 | ||
| - 큰 작업을 작은 단위로 나누기 | ||
| - 각 체크리스트는 1시간 이내에 완료 가능하도록 | ||
| - 테스트와 문서화도 체크리스트에 포함 | ||
|
|
||
| ### 구체적인 설명 | ||
| - "예약 기능 구현" ❌ | ||
| - "사용자가 식당 테이블을 예약하고, 선입금을 결제하며, 예약 내역을 조회할 수 있는 기능 구현" ✅ | ||
|
|
||
| ### 참고 자료 첨부 | ||
| - API 문서 링크 | ||
| - 관련 이슈/PR 링크 | ||
| - 스크린샷 | ||
| - 에러 로그 | ||
|
|
||
| --- | ||
|
|
||
| ## 📌 GitHub CLI로 이슈 생성 | ||
|
|
||
| ```bash | ||
| # 이슈 목록 보기 | ||
| gh issue list | ||
|
|
||
| # Feature 이슈 생성 | ||
| gh issue create \ | ||
| --title "[FEAT]: 예약 취소 기능 구현" \ | ||
| --body "이슈 내용" \ | ||
| --label "feature" | ||
|
|
||
| # Bug 이슈 생성 | ||
| gh issue create \ | ||
| --title "[BUG]: 예약 내역 조회 에러" \ | ||
| --body "이슈 내용" \ | ||
| --label "bug" | ||
|
|
||
| # 이슈에 나 할당 | ||
| gh issue create \ | ||
| --title "[FEAT]: 예약 취소 기능" \ | ||
| --assignee "@me" | ||
| ``` | ||
|
|
||
| --- | ||
|
|
||
| ## ✅ 다음 단계 | ||
|
|
||
| 이슈를 생성했다면 `/start` 커맨드로 작업을 시작하세요! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,93 @@ | ||
| # PR 생성 | ||
|
|
||
| 현재 브랜치의 변경사항을 분석하고 PR을 자동으로 생성합니다. | ||
|
|
||
| --- | ||
|
|
||
| ## 실행 단계 | ||
|
|
||
| ### Step 1: 현재 상태 확인 | ||
|
|
||
| 아래 명령어를 실행해 브랜치명과 미커밋 변경사항을 파악합니다: | ||
|
|
||
| ```bash | ||
| git branch --show-current | ||
| git status --short | ||
| ``` | ||
|
|
||
| 브랜치명 `{타입}/#${이슈번호}-{설명}` 에서 타입과 이슈번호를 추출합니다. | ||
| 브랜치명이 이 형식이 아니면 사용자에게 이슈번호와 타입을 직접 물어봅니다. | ||
|
|
||
| ### Step 2: 테스트 실행 | ||
|
|
||
| ```bash | ||
| ./gradlew test | ||
| ``` | ||
|
|
||
| - **실패 시**: 즉시 중단합니다. 실패한 테스트 목록을 사용자에게 알리고 수정을 요청합니다. PR 생성을 재개하려면 다시 `/pr-create`를 실행하면 됩니다. | ||
| - **통과 시**: 다음 단계로 진행합니다. | ||
|
|
||
| ### Step 3: 미커밋 변경사항 처리 | ||
|
|
||
| `git status`에 변경사항이 있으면: | ||
| 1. 변경된 파일 목록을 보여줍니다 | ||
| 2. 사용자에게 커밋 메시지를 물어봅니다 (형식: `{타입}: {설명} #{이슈번호}`) | ||
| 3. 아래 명령어로 커밋합니다: | ||
|
|
||
| ```bash | ||
| git add {변경된 파일들} | ||
| git commit -m "{타입}: {설명} #{이슈번호}" | ||
| ``` | ||
|
|
||
| 변경사항이 없으면 이 단계를 건너뜁니다. | ||
|
|
||
| ### Step 4: 변경 내용 분석 | ||
|
|
||
| PR 본문 작성을 위해 변경 내용을 분석합니다: | ||
|
|
||
| ```bash | ||
| git diff origin/develop...HEAD --stat | ||
| git log origin/develop...HEAD --oneline | ||
| ``` | ||
|
|
||
| ### Step 5: 브랜치 Push | ||
|
|
||
| ```bash | ||
| git push origin {현재_브랜치명} | ||
| ``` | ||
|
|
||
| ### Step 6: PR 생성 | ||
|
|
||
| 분석한 내용을 바탕으로 아래 형식으로 PR을 생성합니다. | ||
|
|
||
| - **PR 제목**: `[{타입}] {한 줄 요약}` (50자 이하) | ||
| - **본문**: `.github/pull_request_template.md` 기반으로 작성 | ||
| - `### 💡 작업 개요`: git log를 분석해 작업 내용 요약 | ||
| - `### ✅ 작업 내용`: 변경된 파일과 커밋을 기반으로 체크리스트 작성 | ||
| - `### 🧪 테스트 내용`: 통과한 테스트 요약 | ||
| - `### 📝 기타 참고 사항`: 반드시 `Closes #${이슈번호}` 포함 | ||
|
|
||
| ```bash | ||
| gh pr create \ | ||
| --base develop \ | ||
| --title "[{타입}] {요약}" \ | ||
| --body "$(cat <<'EOF' | ||
| ### 💡 작업 개요 | ||
| {작업 요약} | ||
|
|
||
| ### ✅ 작업 내용 | ||
| {체크리스트} | ||
|
|
||
| ### 🧪 테스트 내용 | ||
| - `./gradlew test` 전체 통과 | ||
|
|
||
| ### 📝 기타 참고 사항 | ||
| - Closes #{이슈번호} | ||
| EOF | ||
| )" | ||
| ``` | ||
|
|
||
| ### Step 7: 완료 안내 | ||
|
|
||
| 생성된 PR URL을 사용자에게 알립니다. | ||
| 최소 2명의 팀원에게 리뷰를 요청하도록 안내합니다. | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/start커맨드에서 제안한 브랜치명 규칙 변경에 맞춰, 여기서도 추출 로직에 대한 설명을 일관성 있게 수정하는 것이 좋습니다.