Skip to content

Conversation

@jaeyeonling
Copy link
Contributor

다음은 sessionId를 기준으로 미션을 필터링하는 기능을 백엔드에 추가한 풀 리퀘스트입니다. 이 변경은 MissionController, MissionService, MissionRepository에 반영되었습니다. 주요 변경 사항은 다음과 같습니다:

백엔드 API 개선

  • MissionController: showMissions 엔드포인트에 선택적 sessionId 쿼리 파라미터를 추가했습니다. sessionId가 제공되면 해당 세션 ID에 해당하는 미션들만 반환하고, 없으면 전체 미션을 반환합니다.
    (backend/src/main/java/wooteco/prolog/session/ui/MissionController.java)

서비스 레이어 업데이트

  • MissionService: 특정 세션 ID에 해당하는 미션 목록을 조회하는 findAllBySessionId 메서드를 추가했습니다.
    (backend/src/main/java/wooteco/prolog/session/application/MissionService.java)

리포지토리 레이어 업데이트

  • MissionRepository: 세션 ID로 미션을 조회하는 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]

@jaeyeonling jaeyeonling merged commit 39e2e52 into main May 11, 2025
1 of 2 checks passed
Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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's showMissions endpoint now accepts an optional sessionId query parameter to filter missions by session.
  • Service Layer Update: Added a findAllBySessionId method to MissionService to retrieve missions for a specific session.
  • Repository Layer Update: Added a findBySessionId method to MissionRepository to 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 findAllBySessionId method to retrieve missions by session ID. This method calls the repository to fetch the missions and then converts them to MissionResponse objects.
    • Lines 49-51: Added new method findAllBySessionId that takes a sessionId and returns a list of MissionResponse objects.
  • backend/src/main/java/wooteco/prolog/session/domain/repository/MissionRepository.java
    • Added findBySessionId method to query missions by session ID.
    • Line 14: Added new method findBySessionId that takes a sessionId and returns a list of Mission objects.
  • backend/src/main/java/wooteco/prolog/session/ui/MissionController.java
    • Modified showMissions endpoint to accept an optional sessionId query parameter.
    • Updated the showMissions method to use the sessionId parameter to filter missions if it is provided, otherwise returns all missions.
    • Lines 30-37: Modified showMissions method to accept an optional sessionId parameter and return missions filtered by that session if provided.
    • Reorganized and cleaned up import statements.
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

  1. 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.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants