feat(interview): 세션을 기준으로 미션을 필터링#1645
Conversation
There was a problem hiding this comment.
Hello @jaeyeonling, 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!
Summary of Changes
This pull request introduces the ability to filter missions based on a sessionId. I've modified the MissionController to accept an optional sessionId query parameter. The MissionService and MissionRepository have been updated to support fetching missions by sessionId. Additionally, I've cleaned up some import statements in MissionController.
Highlights
- Backend API Enhancement: The
MissionController'sshowMissionsendpoint now accepts an optionalsessionIdquery parameter to filter missions by session. - Service Layer Update: Added a
findAllBySessionIdmethod toMissionServiceto retrieve missions for a specific session. - Repository Layer Update: Added a
findBySessionIdmethod toMissionRepositoryto query missions by session ID. - Code Cleanup: Cleaned up and reorganized import statements in
MissionController.
Changelog
Click here to see the changelog
- backend/src/main/java/wooteco/prolog/session/application/MissionService.java
- Added
findAllBySessionIdmethod to retrieve missions by session ID. This method calls the repository to fetch the missions and then converts them toMissionResponseobjects. - Lines 49-51: Added new method
findAllBySessionIdthat takes asessionIdand returns a list ofMissionResponseobjects.
- Added
- backend/src/main/java/wooteco/prolog/session/domain/repository/MissionRepository.java
- Added
findBySessionIdmethod to query missions by session ID. - Line 14: Added new method
findBySessionIdthat takes asessionIdand returns a list ofMissionobjects.
- Added
- backend/src/main/java/wooteco/prolog/session/ui/MissionController.java
- Modified
showMissionsendpoint to accept an optionalsessionIdquery parameter. - Updated the
showMissionsmethod to use thesessionIdparameter to filter missions if it is provided, otherwise returns all missions. - Lines 30-37: Modified
showMissionsmethod to accept an optionalsessionIdparameter and return missions filtered by that session if provided. - Reorganized and cleaned up import statements.
- Modified
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 is currently in preview and 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 to provide feedback.
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.
A session's gentle guide,
Missions filtered, side by side,
Code's clarity gleams.
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.
Code Review
The pull request introduces a feature to filter missions based on sessionId. The changes are well-structured and cover the controller, service, and repository layers. The code is generally clean and easy to follow.
Merge Readiness
The code is well-structured and implements the desired functionality. I did not find any issues of critical, high or medium severity. Therefore, I believe the pull request is ready to be merged. I am unable to directly approve the pull request, and recommend that others review and approve this code before merging.
다음은
sessionId를 기준으로 미션을 필터링하는 기능을 백엔드에 추가한 풀 리퀘스트입니다. 이 변경은MissionController,MissionService,MissionRepository에 반영되었습니다. 주요 변경 사항은 다음과 같습니다:백엔드 API 개선
showMissions엔드포인트에 선택적sessionId쿼리 파라미터를 추가했습니다.sessionId가 제공되면 해당 세션 ID에 해당하는 미션들만 반환하고, 없으면 전체 미션을 반환합니다.(
backend/src/main/java/wooteco/prolog/session/ui/MissionController.java)서비스 레이어 업데이트
findAllBySessionId메서드를 추가했습니다.(
backend/src/main/java/wooteco/prolog/session/application/MissionService.java)리포지토리 레이어 업데이트
findBySessionId메서드를 추가했습니다.(
backend/src/main/java/wooteco/prolog/session/domain/repository/MissionRepository.java)사소한 코드 정리
MissionController에서@RequestParam을 포함한 import 구문을 정리하고, 전체 import 구조를 개선했습니다.(
backend/src/main/java/wooteco/prolog/session/ui/MissionController.java) [1] [2]