-
Notifications
You must be signed in to change notification settings - Fork 3
feature : auto push 여부 조회 api #176
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
Conversation
Walkthrough
Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant Controller as UserGithubController
participant Service as UserGithubService
Client->>Controller: GET /api/users/github/status (with AuthUser)
Controller->>Service: getAutoPushStatus(authUser)
Service-->>Controller: UserGitubAutoPushResponse
Controller-->>Client: 200 OK + UserGitubAutoPushResponse
Estimated code review effort🎯 2 (Simple) | ⏱️ ~7 minutes Possibly related PRs
Poem
Note ⚡️ Unit Test Generation is now available in beta!Learn more here, or try it out under "Finishing Touches" below. ✨ Finishing Touches
🧪 Generate unit tests
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. 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)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this 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
🧹 Nitpick comments (1)
src/main/java/org/ezcode/codetest/presentation/usermanagement/UserGithubController.java (1)
58-67: 새로운 상태 조회 엔드포인트가 잘 구현되었습니다. 메서드 명명 규칙 개선을 제안합니다.엔드포인트 구현이 기존 패턴과 일관되고 Swagger 문서화도 잘 되어 있습니다. 다만 Java 명명 규칙에 따라 메서드명을 camelCase로 변경하는 것을 권장합니다.
다음과 같이 메서드명을 변경해보세요:
- public ResponseEntity<UserGitubAutoPushResponse> AutoPushStatus( + public ResponseEntity<UserGitubAutoPushResponse> getAutoPushStatus(
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
src/main/java/org/ezcode/codetest/domain/user/service/UserGithubService.java(1 hunks)src/main/java/org/ezcode/codetest/presentation/usermanagement/UserGithubController.java(1 hunks)
🧰 Additional context used
🧠 Learnings (3)
📓 Common learnings
Learnt from: chat26666
PR: ezcode-my/backend#37
File: src/main/java/org/ezcode/codetest/infrastructure/elasticsearch/repository/ProblemElasticsearchRepositoryDsl.java:10-10
Timestamp: 2025-06-06T19:56:27.759Z
Learning: When user chat26666 mentions that code was implemented in a previous PR but explanation was missing, they may submit a follow-up PR just to add documentation/explanation without the actual implementation code.
Learnt from: minjee2758
PR: ezcode-my/backend#105
File: src/main/resources/application.properties:127-127
Timestamp: 2025-06-26T09:43:03.922Z
Learning: GitHub OAuth에서 자동 커밋 기능을 구현하려면 `repo` scope가 필수적이며, 이는 public/private 저장소 모두에 대한 전체 접근 권한을 제공한다. 공개 저장소만 대상으로 한다면 `public_repo` scope 사용 가능하다. 더 세밀한 권한 제어가 필요하다면 OAuth App 대신 GitHub App 사용을 권장한다.
Learnt from: minjee2758
PR: ezcode-my/backend#110
File: src/main/java/org/ezcode/codetest/domain/user/service/CustomOAuth2UserService.java:102-112
Timestamp: 2025-06-27T06:03:05.761Z
Learning: `CustomOAuth2UserService`의 `updateGithubUrl` 메서드는 새로운 유저 생성 시나 기존 유저가 새로운 AuthType을 추가할 때만 호출되므로, `UserGithubInfo` 중복 생성 가능성이 없다. 별도의 중복 체크 로직이 불필요하다.
Learnt from: minjee2758
PR: ezcode-my/backend#105
File: src/main/resources/application.properties:127-127
Timestamp: 2025-06-26T09:43:03.922Z
Learning: GitHub OAuth에서 자동 커밋 기능 구현을 위해서는 `repo` scope가 필요하며, 이는 저장소에 대한 읽기/쓰기 권한을 제공한다. `user` scope는 커밋 작성자 정보 설정을 위해 필요하다.
Learnt from: pokerbearkr
PR: ezcode-my/backend#89
File: src/main/java/org/ezcode/codetest/presentation/ranking/PointController.java:27-31
Timestamp: 2025-06-22T06:01:45.543Z
Learning: PointController의 getUserPoint 엔드포인트는 다른 사용자의 프로필에서 티어 정보를 표시하기 위한 공개 API로, 모든 사용자가 다른 사용자의 점수를 조회할 수 있도록 설계되었다.
src/main/java/org/ezcode/codetest/presentation/usermanagement/UserGithubController.java (2)
Learnt from: minjee2758
PR: #110
File: src/main/java/org/ezcode/codetest/domain/user/service/CustomOAuth2UserService.java:102-112
Timestamp: 2025-06-27T06:03:05.761Z
Learning: CustomOAuth2UserService의 updateGithubUrl 메서드는 새로운 유저 생성 시나 기존 유저가 새로운 AuthType을 추가할 때만 호출되므로, UserGithubInfo 중복 생성 가능성이 없다. 별도의 중복 체크 로직이 불필요하다.
Learnt from: NCookies
PR: #17
File: src/main/java/org/ezcode/codetest/presentation/problemmanagement/ProblemAdminController.java:25-25
Timestamp: 2025-06-02T06:57:37.929Z
Learning: 이 프로젝트에서는 아직 Spring Security가 적용되지 않아서 @PreAuthorize 어노테이션이 주석 처리되어 있음. Spring Security 도입 전까지는 권한 검증 어노테이션들이 비활성화 상태임.
src/main/java/org/ezcode/codetest/domain/user/service/UserGithubService.java (2)
Learnt from: minjee2758
PR: #110
File: src/main/java/org/ezcode/codetest/domain/user/service/CustomOAuth2UserService.java:102-112
Timestamp: 2025-06-27T06:03:05.761Z
Learning: CustomOAuth2UserService의 updateGithubUrl 메서드는 새로운 유저 생성 시나 기존 유저가 새로운 AuthType을 추가할 때만 호출되므로, UserGithubInfo 중복 생성 가능성이 없다. 별도의 중복 체크 로직이 불필요하다.
Learnt from: minjee2758
PR: #105
File: src/main/resources/application.properties:127-127
Timestamp: 2025-06-26T09:43:03.922Z
Learning: GitHub OAuth에서 자동 커밋 기능 구현을 위해서는 repo scope가 필요하며, 이는 저장소에 대한 읽기/쓰기 권한을 제공한다. user scope는 커밋 작성자 정보 설정을 위해 필요하다.
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: build
🔇 Additional comments (1)
src/main/java/org/ezcode/codetest/domain/user/service/UserGithubService.java (1)
130-137: 새로운 상태 조회 메서드가 올바르게 구현되었습니다.기존
changeAutoPushSetting메서드와 일관된 패턴을 따르고 있으며, 적절한 예외 처리와 응답 객체를 사용하고 있습니다. 읽기 전용 메서드로서 상태를 변경하지 않는 것도 적절합니다.
작업 내용
git_push_status를 찾아 반환합니다참고 사항
코드 리뷰 전 확인 체크리스트
type :)Summary by CodeRabbit
/api/users/github/status)가 추가되었습니다.