Skip to content
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

refactor: 온보딩 bevy 관련 로직 및 테스트 제거 #820

Merged
merged 3 commits into from
Nov 12, 2024

Conversation

kckc0608
Copy link
Member

@kckc0608 kckc0608 commented Nov 8, 2024

🌱 관련 이슈

📌 작업 내용 및 특이사항

  • bevy 관련 로직 제거

📝 참고사항

📚 기타

Summary by CodeRabbit

  • 기능 변경

    • GDSC Bevy 관련 기능이 제거되었습니다. 이제 회원 온보딩 과정에서 Bevy 상태 확인 및 연결 기능이 지원되지 않습니다.
    • 관련된 모든 메서드와 필드가 삭제되어 회원 관리의 단순화가 이루어졌습니다.
  • 버그 수정

    • Bevy 상태 확인과 관련된 오류 코드가 제거되어 더 이상 사용되지 않습니다.
  • 테스트

    • Bevy 상태 확인을 포함한 테스트 케이스가 제거되어 테스트 로직이 간소화되었습니다.

@kckc0608 kckc0608 added the ♻️ refactor 기능 개선 label Nov 8, 2024
@kckc0608 kckc0608 self-assigned this Nov 8, 2024
@kckc0608 kckc0608 requested a review from a team as a code owner November 8, 2024 12:23
Copy link

coderabbitai bot commented Nov 8, 2024

Walkthrough

변경 사항은 OnboardingMemberController, OnboardingMemberService, AssociateRequirement, Member, MemberFullDto, AdminMemberResponse, ErrorCode 클래스에서 GDSC Bevy 인증 로직을 제거하는 데 중점을 두고 있습니다. 이로 인해 관련 메서드 및 필드가 삭제되었으며, API의 기능과 관련된 상태 관리가 단순화되었습니다. 또한, 테스트 클래스에서도 Bevy 상태 검증 관련 테스트가 제거되어, 회원 상태 및 역할 검증에 집중하게 되었습니다.

Changes

파일 경로 변경 요약
src/main/java/com/gdschongik/gdsc/domain/member/api/OnboardingMemberController.java linkBevy() 메서드 제거
src/main/java/com/gdschongik/gdsc/domain/member/application/OnboardingMemberService.java verifyBevyStatus() 메서드 제거
src/main/java/com/gdschongik/gdsc/domain/member/domain/AssociateRequirement.java bevyStatus 필드 및 관련 메서드 제거
src/main/java/com/gdschongik/gdsc/domain/member/domain/Member.java verifyBevy() 메서드 제거
src/main/java/com/gdschongik/gdsc/domain/member/dto/MemberFullDto.java MemberAssociateRequirementDto에서 bevyStatus 필드 제거
src/main/java/com/gdschongik/gdsc/domain/member/dto/response/AdminMemberResponse.java RequirementDto에서 bevyStatus 필드 제거
src/main/java/com/gdschongik/gdsc/global/exception/ErrorCode.java BEVY_NOT_SATISFIED 항목 제거
src/test/java/com/gdschongik/gdsc/domain/member/dao/MemberRepositoryTest.java verifyBevy() 호출 제거
src/test/java/com/gdschongik/gdsc/domain/member/domain/MemberTest.java Bevy 상태 검증 관련 테스트 메서드 제거
src/test/java/com/gdschongik/gdsc/domain/membership/domain/MembershipTest.java verifyBevy() 호출 제거
src/test/java/com/gdschongik/gdsc/domain/membership/domain/MembershipValidatorTest.java verifyBevy() 호출 제거
src/test/java/com/gdschongik/gdsc/domain/study/domain/StudyTest.java verifyBevy() 호출 제거
src/test/java/com/gdschongik/gdsc/helper/FixtureHelper.java verifyBevy() 호출 제거
src/test/java/com/gdschongik/gdsc/helper/IntegrationTest.java verifyBevy() 호출 제거

Assessment against linked issues

Objective Addressed Explanation
bevy 인증 로직 제거 (#818)

Possibly related PRs

Suggested labels

🐛 bug/error

Suggested reviewers

  • Sangwook02
  • AlmondBreez3
  • seulgi99

🐰 변화의 바람이 불어와
Bevy의 길을 잃은 우리들,
더 가벼운 발걸음으로 나아가,
새로운 길을 찾아 함께 뛰어보자!
🌼✨

Warning

Tool Failures:

Tool Failure Count:


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

github-actions bot commented Nov 8, 2024

Job Summary for Gradle

Check Style and Test to Develop :: build-test
Gradle Root Project Requested Tasks Gradle Version Build Outcome Build Scan®
gdsc check 8.5 Build Scan published

@kckc0608 kckc0608 changed the title refactor: 온보딩 시 bevy 관련 로직 및 테스트 제거 refactor: 온보딩 bevy 관련 로직 및 테스트 제거 Nov 8, 2024
Copy link

github-actions bot commented Nov 8, 2024

Job Summary for Gradle

Check Style and Test to Develop :: build-test
Gradle Root Project Requested Tasks Gradle Version Build Outcome Build Scan®
gdsc check 8.5 Build Scan published

Copy link

@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: 0

🧹 Outside diff range and nitpick comments (1)
src/main/java/com/gdschongik/gdsc/domain/member/domain/AssociateRequirement.java (1)

Line range hint 1-116: 아키텍처 개선 제안: 요구사항 상태 관리 최적화

현재 각각의 상태(univStatus, discordStatus, infoStatus)가 개별적으로 관리되고 있습니다. 향후 요구사항이 추가되거나 변경될 때 더 유연하게 대응할 수 있도록 다음과 같은 개선을 고려해보시는 것은 어떨까요?

  1. 요구사항 타입을 enum으로 분리
  2. 상태를 Map으로 관리
  3. 검증 로직을 전략 패턴으로 구현

이러한 변경은 코드의 유연성과 확장성을 높일 수 있습니다.

예시 코드를 제공해드릴까요?

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 482acaf and 34f6d72.

📒 Files selected for processing (14)
  • src/main/java/com/gdschongik/gdsc/domain/member/api/OnboardingMemberController.java (0 hunks)
  • src/main/java/com/gdschongik/gdsc/domain/member/application/OnboardingMemberService.java (0 hunks)
  • src/main/java/com/gdschongik/gdsc/domain/member/domain/AssociateRequirement.java (1 hunks)
  • src/main/java/com/gdschongik/gdsc/domain/member/domain/Member.java (0 hunks)
  • src/main/java/com/gdschongik/gdsc/domain/member/dto/MemberFullDto.java (0 hunks)
  • src/main/java/com/gdschongik/gdsc/domain/member/dto/response/AdminMemberResponse.java (1 hunks)
  • src/main/java/com/gdschongik/gdsc/global/exception/ErrorCode.java (0 hunks)
  • src/test/java/com/gdschongik/gdsc/domain/member/dao/MemberRepositoryTest.java (0 hunks)
  • src/test/java/com/gdschongik/gdsc/domain/member/domain/MemberTest.java (1 hunks)
  • src/test/java/com/gdschongik/gdsc/domain/membership/domain/MembershipTest.java (0 hunks)
  • src/test/java/com/gdschongik/gdsc/domain/membership/domain/MembershipValidatorTest.java (0 hunks)
  • src/test/java/com/gdschongik/gdsc/domain/study/domain/StudyTest.java (0 hunks)
  • src/test/java/com/gdschongik/gdsc/helper/FixtureHelper.java (0 hunks)
  • src/test/java/com/gdschongik/gdsc/helper/IntegrationTest.java (0 hunks)
💤 Files with no reviewable changes (11)
  • src/main/java/com/gdschongik/gdsc/domain/member/api/OnboardingMemberController.java
  • src/main/java/com/gdschongik/gdsc/domain/member/application/OnboardingMemberService.java
  • src/main/java/com/gdschongik/gdsc/domain/member/domain/Member.java
  • src/main/java/com/gdschongik/gdsc/domain/member/dto/MemberFullDto.java
  • src/main/java/com/gdschongik/gdsc/global/exception/ErrorCode.java
  • src/test/java/com/gdschongik/gdsc/domain/member/dao/MemberRepositoryTest.java
  • src/test/java/com/gdschongik/gdsc/domain/membership/domain/MembershipTest.java
  • src/test/java/com/gdschongik/gdsc/domain/membership/domain/MembershipValidatorTest.java
  • src/test/java/com/gdschongik/gdsc/domain/study/domain/StudyTest.java
  • src/test/java/com/gdschongik/gdsc/helper/FixtureHelper.java
  • src/test/java/com/gdschongik/gdsc/helper/IntegrationTest.java
🔇 Additional comments (4)
src/main/java/com/gdschongik/gdsc/domain/member/dto/response/AdminMemberResponse.java (1)

41-47: LGTM! Bevy 관련 로직이 깔끔하게 제거되었습니다.

RequirementDto에서 bevyStatus 필드가 제거되어 요구사항이 단순화되었습니다. 이는 PR의 목적인 Bevy 인증 로직 제거와 잘 부합합니다.

src/main/java/com/gdschongik/gdsc/domain/member/domain/AssociateRequirement.java (1)

34-38: 생성자 매개변수가 깔끔하게 정리되었습니다.

Bevy 관련 로직이 제거되면서 생성자가 더 간단하고 명확해졌습니다. 필수적인 상태 값만 남아있어 클래스의 책임이 더욱 명확해졌습니다.

src/test/java/com/gdschongik/gdsc/domain/member/domain/MemberTest.java (2)

Line range hint 1-322: 테스트 구조가 Bevy 제거 후에도 적절하게 유지되었습니다.

회원 상태 전이에 대한 핵심 테스트 케이스들이 잘 보존되어 있으며, Bevy 관련 검증이 제거된 후에도 다음 주요 시나리오들이 충분히 커버되고 있습니다:

  • 게스트 회원가입
  • 준회원 승급 조건 검증
  • 정회원 승급 조건 검증
  • 회원 탈퇴 및 정보 수정

323-323: 회원 강등 시 요구사항 초기화가 올바르게 검증됩니다.

비회원으로 강등 시 모든 준회원 가입 요구사항이 UNSATISFIED 상태로 초기화되는 것을 확인하는 테스트가 적절히 구현되어 있습니다.

Copy link
Member

@Sangwook02 Sangwook02 left a comment

Choose a reason for hiding this comment

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

lgtm입니다~
머지할 때 db 변경사항도 같이 반영 필요할 것 같네요!

Copy link
Member

@uwoobeat uwoobeat left a comment

Choose a reason for hiding this comment

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

lgtm

@kckc0608 kckc0608 merged commit 0e1612f into develop Nov 12, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
♻️ refactor 기능 개선
Projects
None yet
Development

Successfully merging this pull request may close these issues.

♻️ 온보딩 Bevy 인증 로직 제거
3 participants