Skip to content

Conversation

@2heunxun
Copy link
Contributor

Summary

해당 PR에 대한 요약을 작성해주세요.

Tasks

  • 현재 상태 Enum만 넘기는 값을 수정하여, Title(사유), Description(세부내용)을 넘겨주었습니다.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 27, 2026

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

  • 🔍 Trigger a full review

개요

졸업생 사용자 API가 일정 정보를 통합하도록 수정되었습니다. GraduationUserFacade에 일정 조회 기능이 추가되었고, MyGraduationUserResponse의 응답 구조가 상태 필드에서 제목과 설명 필드로 리팩토링되었으며 제출 유형별 마감일 형식이 추가되었습니다.

변경사항

응집도 / 파일 요약
일정 통합 서비스 계층
aics-api/src/main/java/kgu/developers/api/graduationUser/application/GraduationUserFacade.java
ScheduleQueryService 의존성 추가, getMyGraduationUser() 메서드에서 제출 유형을 기반으로 일정을 조회하고 응답 생성 시 일정 정보 전달
응답 모델 리팩토링
aics-api/src/main/java/kgu/developers/api/graduationUser/presentation/response/MyGraduationUserResponse.java
status 필드를 title/description 필드로 대체, from() 메서드에 Schedule 매개변수 추가, 상태를 제출 유형으로 매핑하는 requiredSubmissionType() 메서드 신규 추가, 한국식 날짜 형식 및 마감일 메시지 포맷팅 로직 구현

예상 코드 리뷰 소요 시간

🎯 4 (복잡함) | ⏱️ ~45분

관련 가능성이 있는 PR

추천 레이블

🔨refactor

추천 리뷰어

  • dkdltm221
  • LeeHanEum
  • JangYeongHu
  • hoTan35
🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 16.67% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed PR 제목은 변경사항의 핵심을 명확하게 반영합니다. Graduation User Response에 Title과 Description 필드를 추가하는 리팩토링의 목적을 충분히 설명합니다.
Description check ✅ Passed PR 설명은 변경사항과 관련이 있습니다. 기존 Enum 상태값만 전달하던 방식을 Title(사유)과 Description(세부내용)을 전달하도록 수정했다는 내용을 명확히 설명합니다.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In
`@aics-api/src/main/java/kgu/developers/api/graduationUser/application/GraduationUserFacade.java`:
- Around line 31-35: getMyGraduationUser currently only guards against
submissionType == null but calls
scheduleQueryService.getBySubmissionType(submissionType) which throws
ScheduleNotFoundException when no schedule exists; update getMyGraduationUser to
either use
scheduleQueryService.findBySubmissionType(submissionType).orElse(null) or wrap
the getBySubmissionType call in a try/catch for ScheduleNotFoundException and
set schedule to null so MyGraduationUserResponse.from(graduationUser, schedule)
receives a null schedule instead of letting the exception propagate.

Comment on lines 31 to +35
public MyGraduationUserResponse getMyGraduationUser() {
GraduationUser graduationUser = graduationUserQueryService.me();
return MyGraduationUserResponse.from(graduationUser);
SubmissionType submissionType = MyGraduationUserResponse.requiredSubmissionType(graduationUser);
Schedule schedule = (submissionType == null) ? null : scheduleQueryService.getBySubmissionType(submissionType);
return MyGraduationUserResponse.from(graduationUser, schedule);
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Find and examine ScheduleQueryService
fd -type f -name "*.java" | xargs rg -l "ScheduleQueryService" | head -20

Repository: kgu-developers/aics-server

Length of output: 1407


🏁 Script executed:

#!/bin/bash
# Look for ScheduleQueryService class definition
rg -n "class ScheduleQueryService" -A 20

Repository: kgu-developers/aics-server

Length of output: 5508


🏁 Script executed:

#!/bin/bash
# Search for getBySubmissionType method definition
rg -n "getBySubmissionType" -B 2 -A 5

Repository: kgu-developers/aics-server

Length of output: 9292


🏁 Script executed:

#!/bin/bash
# Find MyGraduationUserResponse class and from() method
rg -n "class MyGraduationUserResponse" -A 30

Repository: kgu-developers/aics-server

Length of output: 52


🏁 Script executed:

#!/bin/bash
# Search for MyGraduationUserResponse.from() method
rg -n "from\(" -B 2 -A 10 | grep -A 10 "MyGraduationUserResponse"

Repository: kgu-developers/aics-server

Length of output: 4763


🏁 Script executed:

#!/bin/bash
# Find ScheduleNotFoundException to understand exception type
rg -n "ScheduleNotFoundException" -B 2 -A 5

Repository: kgu-developers/aics-server

Length of output: 14587


스케줄 미존재 시 예외 처리 필요

getBySubmissionType()은 스케줄이 없을 때 ScheduleNotFoundException을 던지도록 구현되어 있습니다. 현재 코드에서는 submissionType == null인 경우만 방어하고 있어서, submissionType이 non-null이지만 해당 스케줄이 존재하지 않으면 예외가 처리되지 않아 500 에러로 응답하게 됩니다. 이는 MyGraduationUserResponse.from()의 null 스케줄 fallback 로직이 동작할 수 없음을 의미합니다.

Optional을 활용하거나 예외를 캐치하여 schedule을 null 처리하는 방식으로 개선해주세요:

// 방법 1: Optional 활용
Schedule schedule = (submissionType == null) ? null : scheduleQueryService.findBySubmissionType(submissionType).orElse(null);

// 방법 2: 예외 캐치
Schedule schedule = null;
if (submissionType != null) {
    try {
        schedule = scheduleQueryService.getBySubmissionType(submissionType);
    } catch (ScheduleNotFoundException e) {
        // schedule은 null로 유지
    }
}
🤖 Prompt for AI Agents
In
`@aics-api/src/main/java/kgu/developers/api/graduationUser/application/GraduationUserFacade.java`
around lines 31 - 35, getMyGraduationUser currently only guards against
submissionType == null but calls
scheduleQueryService.getBySubmissionType(submissionType) which throws
ScheduleNotFoundException when no schedule exists; update getMyGraduationUser to
either use
scheduleQueryService.findBySubmissionType(submissionType).orElse(null) or wrap
the getBySubmissionType call in a try/catch for ScheduleNotFoundException and
set schedule to null so MyGraduationUserResponse.from(graduationUser, schedule)
receives a null schedule instead of letting the exception propagate.

@github-actions
Copy link

github-actions bot commented Jan 27, 2026

Test Coverage Report

Overall Project 80.7% -0.13% 🍏
Files changed 75% 🍏

Module Coverage
aics-api 84.08% -1.2% 🍏
Files
Module File Coverage
aics-api GraduationUserFacade.java 90% -10% 🍏

@codecov
Copy link

codecov bot commented Jan 27, 2026

Codecov Report

❌ Patch coverage is 66.66667% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...aduationUser/application/GraduationUserFacade.java 66.66% 0 Missing and 1 partial ⚠️

Impacted file tree graph

@@              Coverage Diff              @@
##             develop     #325      +/-   ##
=============================================
- Coverage      87.25%   86.97%   -0.29%     
  Complexity        67       67              
=============================================
  Files             24       24              
  Lines            259      261       +2     
  Branches          14       15       +1     
=============================================
+ Hits             226      227       +1     
  Misses            21       21              
- Partials          12       13       +1     
Files with missing lines Coverage Δ Complexity Δ
...aduationUser/application/GraduationUserFacade.java 90.00% <66.66%> (-10.00%) 3.00 <0.00> (ø)

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6997afd...af61e7b. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Contributor

@dkdltm221 dkdltm221 left a comment

Choose a reason for hiding this comment

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

LGTM! 문제없어보입니다.
리뷰 하나만 확인해주세요

Copy link
Contributor

@JangYeongHu JangYeongHu left a comment

Choose a reason for hiding this comment

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

LGTM! 리뷰만 반영부탁드립니다

@JangYeongHu JangYeongHu merged commit 045d746 into develop Jan 27, 2026
5 checks passed
@JangYeongHu JangYeongHu deleted the refactor/KD-68 branch January 27, 2026 12:19
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.

4 participants