Repository navigation
Conversation
- Question 엔티티에 updateCategory() 메서드 추가 - Question 엔티티에 updatePublishAt() 메서드 추가 - Question 엔티티에 updateCloseAt() 메서드 추가 - QUESTION_UPDATE_NOT_ALLOWED 에러 코드 추가 (DRAFT 상태가 아닌 질문 수정 시도 시 사용)
- UpdateQuestionRequest 레코드 추가 (title, description, choice1, choice2, category, publishAt, closeAt) - UpdateQuestionResponse 레코드 추가 (id, status, content, options, plannedPublishAt, createdAt) - @SiZe validation으로 필드 길이 제한 적용
- AdminQuestionService에 updateQuestion() 메서드 추가
- DRAFT 상태 검증 후 부분 업데이트 수행
- null이 아닌 필드만 선택적으로 업데이트
- AdminQuestionController에 PATCH /{id} 엔드포인트 추가
- @ApiErrorExamples 어노테이션으로 에러 케이스 문서화
Summary of ChangesHello @Jinyshin, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! 이 PR은 관리자가 DRAFT 상태의 질문을 유연하게 수정할 수 있도록 새로운 기능을 도입합니다. 이를 통해 질문이 게시되기 전에 세부 사항을 조정할 수 있는 관리 효율성이 향상됩니다. 구현은 부분 업데이트를 지원하며, DRAFT 상태의 질문만 수정할 수 있도록 엄격한 검증 로직을 포함하여 데이터 무결성을 보장합니다. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
PR 리뷰전반적으로 DRAFT 질문 수정 API가 잘 구현되었습니다. 부분 업데이트 로직과 DRAFT 상태 검증이 적절하게 처리되었네요. P2 (적극적으로 고려해주세요)
P3 (웬만하면 반영해주세요)
P4 (반영해도 좋고 넘어가도 좋습니다)
|
- UpdateQuestionResponse 필드명 변경 - content → description (Request DTO와 일관성) - plannedPublishAt → publishAt (엔티티와 일관성) - options 배열 → choice1, choice2 개별 필드로 변경 - Question 엔티티에 updateChoice1(), updateChoice2() 메서드 추가 - AdminQuestionService 선택지 업데이트 로직 간소화 - 다른 필드들과 동일한 패턴으로 통일
코드 리뷰DRAFT 상태 질문 수정 API 구현이 전반적으로 잘 되어 있습니다. 부분 업데이트 패턴도 적절하게 적용되었고, 상태 검증 로직도 명확합니다. P2 (적극적으로 고려해주세요)
if (request.publishAt() != null && request.closeAt() != null) {
if (request.closeAt().isBefore(request.publishAt())) {
throw new BusinessException(ErrorCode.INVALID_TIME_RANGE);
}
}
P3 (웬만하면 반영해주세요)
P4 (반영해도 좋고 넘어가도 좋습니다)
|
- P2-1: publishAt/closeAt 시간 검증 추가 - closeAt이 publishAt 이후인지 검증 - QUESTION_INVALID_TIME_RANGE 에러 코드 추가 - P2-2: 빈 문자열 검증 추가 - title, description, choice1, choice2에 @SiZe(min=1) 적용 - P3-1, P4-1: UpdateQuestionResponse에 title, category 필드 추가 - P3-3: 미사용 updateChoices() 메서드 제거
PR 리뷰DRAFT 질문 수정 API 구현이 잘 되었습니다. 부분 업데이트와 유효성 검증 로직도 적절하게 처리되었네요. P2 (적극적으로 고려해주세요)
Map.of(
request.title(), question::updateTitle,
request.description(), question::updateDescription,
// ...
).forEach((value, updater) -> {
if (value != null) updater.accept(value);
});
P3 (웬만하면 반영해주세요)
P4 (반영해도 좋고 넘어가도 좋습니다)
|
Summary
Test plan