Skip to content

feat: 마이페이지 응답에 국내 대학교명 추가#785

Merged
sukangpunch merged 1 commit into
developfrom
add-homeUniversiyName-on-my
Jun 22, 2026
Merged

feat: 마이페이지 응답에 국내 대학교명 추가#785
sukangpunch merged 1 commit into
developfrom
add-homeUniversiyName-on-my

Conversation

@yoonc01

@yoonc01 yoonc01 commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

작업 내용

학교 이메일 인증과 관련하여 마이 페이지에서 이메일 인증 여부를 확인하기 위해
국개 대학교명을 응답에 추가하였습니다.

@coderabbitai

coderabbitai Bot commented Jun 22, 2026

Copy link
Copy Markdown

Review Change Stack

Walkthrough

  1. MyPageResponse DTO 확장

    • MyPageResponse 레코드에 String homeUniversityName 컴포넌트가 추가됐습니다.
    • of(...) 팩토리 메서드의 파라미터와 내부 생성자 호출부 모두 homeUniversityName을 포함하도록 확장됐습니다.
  2. MyPageService 조회 로직 추가

    • HomeUniversityRepository 의존성 필드가 추가됐습니다.
    • getMyPageInfo에서 신규 private 헬퍼 findHomeUniversityName을 호출해 홈대학교 이름을 조회합니다.
    • findHomeUniversityNamehomeUniversityIdnull이면 null을 반환하고, 엔티티가 없으면 UNIVERSITY_NOT_FOUND 예외를 던집니다.
  3. MyPageServiceTest 검증 보강

    • HomeUniversityHomeUniversityFixture import와 @Autowired 필드가 추가됐습니다.
    • 학교 인증된 멘티에게 homeUniversityName이 올바르게 반환되는 시나리오 테스트가 추가됐습니다.
    • 기존 멘티/멘토 테스트에 homeUniversityName null 여부 assertion이 추가됐습니다.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Suggested reviewers

  • wibaek
  • lsy1307
  • whqtker
  • nayonsoso
🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning PR 설명이 필수 섹션 구조를 충족하지 못하고 있습니다. '관련 이슈' 섹션과 '특이 사항', '리뷰 요구사항' 섹션이 완전히 빠져있으며, '작업 내용'도 매우 간단한 수준입니다. PR 템플릿의 모든 필수 섹션('관련 이슈', '작업 내용', '특이 사항', '리뷰 요구사항')을 채워주세요. 특히 '관련 이슈' 번호와 더 상세한 작업 내용 설명을 추가해 주시기 바랍니다.
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 (3 passed)
Check name Status Explanation
Title check ✅ Passed PR 제목이 변경사항의 핵심을 명확하게 요약하고 있습니다: 마이페이지 응답에 국내 대학교명을 추가하는 것이 주요 변경사항이며, 제목이 이를 직결적으로 반영합니다.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch add-homeUniversiyName-on-my

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.

@sukangpunch sukangpunch left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

고생하셨습니다!

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
src/test/java/com/example/solidconnection/siteuser/service/MyPageServiceTest.java (1)

156-168: 🧹 Nitpick | 🔵 Trivial | ⚡ Quick win

1) 예외 경로도 테스트로 고정해 주세요.

- Line 156-168은 성공 케이스를 잘 검증하고 있습니다.
- `findHomeUniversityName`의 실패 경로(잘못된 `homeUniversityId`로 조회 실패 시 `UNIVERSITY_NOT_FOUND`)도 한 케이스 추가하면 회귀 방지에 더 탄탄해집니다.
테스트 보강 예시
+    `@Test`
+    void 홈대학교_ID는_있지만_대상이_없으면_예외가_발생한다() {
+        // given
+        SiteUser invalidUser = siteUserFixture.국내_대학_정보_소지_사용자(Long.MAX_VALUE);
+
+        // when & then
+        assertThatThrownBy(() -> myPageService.getMyPageInfo(invalidUser.getId()))
+                .isInstanceOf(CustomException.class);
+    }
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@src/test/java/com/example/solidconnection/siteuser/service/MyPageServiceTest.java`
around lines 156 - 168, Add a new test method to cover the failure path of the
findHomeUniversityName operation. Create a test case that verifies the exception
scenario where attempting to look up a homeUniversity with an invalid or
non-existent homeUniversityId results in a UNIVERSITY_NOT_FOUND exception. This
complementary test should use a fixture that creates a SiteUser with an invalid
homeUniversityId and assert that the appropriate exception or error response is
thrown when calling myPageService.getMyPageInfo. This ensures comprehensive
coverage of both the success case (existing test
학교_인증된_멘티의_마이페이지_정보를_조회하면_국내_대학교_이름을_반환한다) and the failure case for improved
regression prevention.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In
`@src/test/java/com/example/solidconnection/siteuser/service/MyPageServiceTest.java`:
- Around line 156-168: Add a new test method to cover the failure path of the
findHomeUniversityName operation. Create a test case that verifies the exception
scenario where attempting to look up a homeUniversity with an invalid or
non-existent homeUniversityId results in a UNIVERSITY_NOT_FOUND exception. This
complementary test should use a fixture that creates a SiteUser with an invalid
homeUniversityId and assert that the appropriate exception or error response is
thrown when calling myPageService.getMyPageInfo. This ensures comprehensive
coverage of both the success case (existing test
학교_인증된_멘티의_마이페이지_정보를_조회하면_국내_대학교_이름을_반환한다) and the failure case for improved
regression prevention.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: f45451c2-c320-49a2-be0d-b353118209bc

📥 Commits

Reviewing files that changed from the base of the PR and between 3144296 and 3bf5a2e.

📒 Files selected for processing (3)
  • src/main/java/com/example/solidconnection/siteuser/dto/MyPageResponse.java
  • src/main/java/com/example/solidconnection/siteuser/service/MyPageService.java
  • src/test/java/com/example/solidconnection/siteuser/service/MyPageServiceTest.java

@sukangpunch sukangpunch added 기능 진행 중 자유롭게 merge 가능 labels Jun 22, 2026
@sukangpunch sukangpunch merged commit 301c553 into develop Jun 22, 2026
5 checks passed
@yoonc01 yoonc01 deleted the add-homeUniversiyName-on-my branch June 22, 2026 14:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

기능 진행 중 자유롭게 merge 가능

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants