-
Notifications
You must be signed in to change notification settings - Fork 2
feat: 댓글 작성시 res DTO 데이터 추가 #196
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
Conversation
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.
Summary of Changes
Hello @kjhh2605, 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은 댓글 작성 시 반환되는 응답 데이터에 댓글 작성자의 정보를 포함하도록 개선합니다. 기존에는 댓글 ID와 같은 기본적인 정보만 제공되었으나, 이제는 작성자의 이름 ID, 닉네임, 프로필 이미지 URL이 함께 제공되어 API 사용자가 댓글과 관련된 사용자 정보를 즉시 확인할 수 있게 됩니다. 이는 사용자 경험을 향상시키고 추가적인 API 호출 없이 필요한 정보를 얻을 수 있도록 합니다.
Highlights
- 댓글 작성 응답 DTO 개선: 댓글 작성 후 반환되는 WriteCommentResponseDTO에 댓글 작성자의 nameId, nickname, profileImageUrl 필드를 추가했습니다.
- CommentConverter 업데이트: CommentConverter의 CommentToWriteCommentResponseDTO 메서드에서 새로 추가된 사용자 정보를 WriteCommentResponseDTO에 매핑하도록 수정했습니다.
Using Gemini Code Assist
The 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 in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.
| Feature | Command | Description |
|---|---|---|
| Code Review | /gemini review |
Performs a code review for the current pull request in its current state. |
| Pull Request Summary | /gemini summary |
Provides a summary of the current pull request in its current state. |
| Comment | @gemini-code-assist | Responds in comments when explicitly tagged, both in issue comments and review comments. |
| Help | /gemini help |
Displays a list of available commands. |
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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.
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
-
Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩
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.
Pull Request Overview
This PR adds user information fields to the comment creation response DTO. The change enhances the comment write response by including the user's nameId, nickname, and profile image URL alongside the existing comment data.
- Added user identification fields (nameId, nickname, profileImageUrl) to WriteCommentResponseDTO
- Updated the converter to populate these new fields from the comment's associated user
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| CommentResponseDTO.java | Added three new user-related fields to WriteCommentResponseDTO class |
| CommentConverter.java | Updated converter to populate new user fields from comment.getUser() |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| private String nameId; | ||
| @NotNull | ||
| private String nickname; | ||
| @NotNull |
Copilot
AI
Aug 21, 2025
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.
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.
Code Review
안녕하세요. 댓글 작성 시 응답 DTO에 사용자 정보를 추가하는 변경 사항 잘 보았습니다. 전반적으로 PR의 목적에 맞게 잘 구현되었지만, 코드의 안정성과 가독성을 높이기 위해 몇 가지 제안 사항을 드립니다. WriteCommentResponseDTO의 profileImageUrl 필드는 User 엔티티에서 null을 허용하므로 @NotNull 제약 조건을 제거하는 것이 안전합니다. 또한 CommentConverter에서 빌더 패턴을 사용할 때 DTO 필드 선언 순서와 일치시키면 코드를 이해하고 유지보수하기가 더 쉬워질 것입니다. 자세한 내용은 각 파일의 주석을 참고해주세요.
| @NotNull | ||
| private String profileImageUrl; |
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.
User 엔티티의 profileImageUrl 필드는 null 값을 가질 수 있습니다. 하지만 WriteCommentResponseDTO에서는 이 필드를 @NotNull로 지정하고 있어, 프로필 이미지가 없는 사용자의 댓글 생성 시 응답 데이터가 DTO의 제약 조건에 위배될 수 있습니다. 이는 클라이언트 측에서 예기치 않은 오류를 발생시킬 수 있으므로, @NotNull 어노테이션을 제거하여 실제 데이터 모델을 정확하게 반영하는 것이 좋습니다.
| @NotNull | |
| private String profileImageUrl; | |
| private String profileImageUrl; |
| .nameId(comment.getUser().getNameId()) | ||
| .profileImageUrl(comment.getUser().getProfileImageUrl()) | ||
| .nickname(comment.getUser().getNickname()) |
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.
코드 가독성과 유지보수성을 향상시키기 위해, CommentConverter에서 WriteCommentResponseDTO 객체를 생성할 때 빌더의 메서드 호출 순서를 DTO 클래스에 선언된 필드 순서(nameId, nickname, profileImageUrl)와 동일하게 맞추는 것을 제안합니다. 이렇게 하면 코드를 읽는 사람이 DTO의 구조를 더 쉽게 파악할 수 있습니다.
| .nameId(comment.getUser().getNameId()) | |
| .profileImageUrl(comment.getUser().getProfileImageUrl()) | |
| .nickname(comment.getUser().getNickname()) | |
| .nameId(comment.getUser().getNameId()) | |
| .nickname(comment.getUser().getNickname()) | |
| .profileImageUrl(comment.getUser().getProfileImageUrl()) |
jwon0523
left a comment
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.
긴급사정으로 승인해드리겠습니다 ㅋㅋㅋㅋ
#️⃣연관된 이슈
📝작업 내용
스크린샷 (선택)
💬리뷰 요구사항(선택)