Skip to content

feat: Google Drive 권한 연결 URL 조회 API 추가#489

Merged
JanooGwan merged 1 commit intodevelopfrom
codex-google-drive-authorize-url
Apr 1, 2026
Merged

feat: Google Drive 권한 연결 URL 조회 API 추가#489
JanooGwan merged 1 commit intodevelopfrom
codex-google-drive-authorize-url

Conversation

@JanooGwan
Copy link
Copy Markdown
Contributor

🔍 개요

  • Google Drive 권한 재연결 흐름에서 프론트가 바로 사용할 수 있도록 authorize URL을 JSON으로 내려주는 백엔드 API를 추가했습니다.

🚀 주요 변경 내용

  • GoogleDriveOAuthControllerGET /auth/oauth/google/drive/authorize-url 엔드포인트를 추가해 로그인 사용자의 Google Drive authorize URL을 JSON으로 반환하도록 구현했습니다.
  • GoogleDriveAuthorizationUrlResponse DTO를 추가해 프론트가 authorizationUrl 필드를 그대로 사용해 브라우저 이동할 수 있게 했습니다.
  • GoogleDriveOAuthControllerTest를 추가해 새 엔드포인트가 로그인 사용자 기준 authorize URL을 정상 반환하는지 검증했습니다.

💬 참고 사항

  • 기존 GET /auth/oauth/google/drive/authorize의 302 redirect 방식은 그대로 유지했습니다.
  • 프론트는 새 엔드포인트 호출 후 응답의 authorizationUrlwindow.location 이동만 해주면 됩니다.
  • 검증은 ./gradlew.bat test --tests "gg.agit.konect.integration.infrastructure.oauth.GoogleDriveOAuthControllerTest"로 확인했습니다.

✅ Checklist (완료 조건)

  • 코드 스타일 가이드 준수
  • 테스트 코드 포함됨
  • Reviewers / Assignees / Labels 지정 완료
  • 보안 및 민감 정보 검증 (API 키, 환경 변수, 개인정보 등)

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 1, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 252b9496-30fb-41ac-b9e9-5aca8238ebc2

📥 Commits

Reviewing files that changed from the base of the PR and between 7f80d07 and 16ba02b.

📒 Files selected for processing (3)
  • src/main/java/gg/agit/konect/infrastructure/oauth/GoogleDriveOAuthController.java
  • src/main/java/gg/agit/konect/infrastructure/oauth/dto/GoogleDriveAuthorizationUrlResponse.java
  • src/test/java/gg/agit/konect/integration/infrastructure/oauth/GoogleDriveOAuthControllerTest.java
📜 Recent review details
⏰ 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: Analyze (java-kotlin)
🧰 Additional context used
📓 Path-based instructions (2)
src/main/java/**/*.java

⚙️ CodeRabbit configuration file

src/main/java/**/*.java: 아래 원칙으로 리뷰 코멘트를 작성한다.

  • 코멘트는 반드시 한국어로 작성한다.
  • 반드시 수정이 필요한 항목만 코멘트로 남기고, 단순 취향 차이는 지적하지 않는다.
  • 각 코멘트 첫 줄에 심각도를 [LEVEL: high|medium|low] 형식으로 반드시 표기한다.
  • 심각도 기준: high=운영 장애 가능, medium=품질 저하, low=개선 권고.
  • 각 코멘트는 "문제 -> 영향 -> 제안" 순서로 3문장 이내로 간결하게 작성한다.
  • 가능하면 재현 조건 및 실패 시나리오도 포함한다.
  • 제안은 현재 코드베이스(Spring Boot + JPA + Flyway) 패턴과 일치해야 한다.
  • 보안, 트랜잭션 경계, 예외 처리, N+1, 성능 회귀 가능성을 우선 점검한다.
  • 가독성: 변수/메서드 이름이 의도를 바로 드러내는지, 중첩과 메서드 길이가 과도하지 않은지 점검한다.
  • 단순화: 불필요한 추상화, 중복 로직, 과한 방어 코드가 있으면 더 단순한 대안을 제시한다.
  • 확장성: 새 요구사항 추가 시 변경 범위가 최소화되는 구조인지(하드코딩 분기/값 여부 포함) 점검한다.

Files:

  • src/main/java/gg/agit/konect/infrastructure/oauth/dto/GoogleDriveAuthorizationUrlResponse.java
  • src/main/java/gg/agit/konect/infrastructure/oauth/GoogleDriveOAuthController.java
**/*

⚙️ CodeRabbit configuration file

**/*: 공통 리뷰 톤 가이드:

  • 모든 코멘트는 첫 줄에 [LEVEL: ...] 태그를 포함한다.
  • 과장된 표현 없이 사실 기반으로 작성한다.
  • 한 코멘트에는 하나의 이슈만 다룬다.
  • 코드 예시가 필요하면 최소 수정 예시를 제시한다.
  • 가독성/단순화/확장성 이슈를 발견하면 우선순위를 높여 코멘트한다.

Files:

  • src/main/java/gg/agit/konect/infrastructure/oauth/dto/GoogleDriveAuthorizationUrlResponse.java
  • src/main/java/gg/agit/konect/infrastructure/oauth/GoogleDriveOAuthController.java
  • src/test/java/gg/agit/konect/integration/infrastructure/oauth/GoogleDriveOAuthControllerTest.java

📝 Walkthrough

개요

Google Drive OAuth 인증 URL을 조회하는 새로운 엔드포인트 GET /authorize-url이 추가되었으며, 응답 DTO 클래스와 OpenAPI/Swagger 문서화 주석이 도입되었습니다. 해당 기능에 대한 통합 테스트도 추가되었습니다.

변경 사항

집합 / 파일(들) 요약
OAuth 컨트롤러 및 응답 DTO
src/main/java/gg/agit/konect/infrastructure/oauth/GoogleDriveOAuthController.java, src/main/java/gg/agit/konect/infrastructure/oauth/dto/GoogleDriveAuthorizationUrlResponse.java
새로운 GET /authorize-url 엔드포인트 추가로 GoogleDriveAuthorizationUrlResponse 반환. Swagger @Tag, @Operation 주석으로 문서화. authorizationUrl 필드를 가진 새 record 클래스 도입.
통합 테스트
src/test/java/gg/agit/konect/integration/infrastructure/oauth/GoogleDriveOAuthControllerTest.java
새로운 OAuth 엔드포인트에 대한 통합 테스트 클래스 추가. 서비스 mocking, 사용자 인증 설정, 엔드포인트 응답 검증 포함.

시 (Poem)

🐰 새로운 길을 만든 우리의 변화,
Google Drive의 문을 여는 열쇠,
Swagger 주석으로 명확하게 빛나고,
테스트가 든든히 받쳐주네!
OAuth의 춤은 이제 더욱 우아하여라. ✨

예상 코드 리뷰 시간

🎯 2 (Simple) | ⏱️ ~12분

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% 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 제목이 변경 사항의 핵심을 명확하게 요약합니다: Google Drive 권한 연결 URL을 조회하는 새 API 추가.
Description check ✅ Passed PR 설명이 변경 사항과 관련이 있으며, 추가된 엔드포인트, DTO, 테스트에 대해 명확하게 설명합니다.

✏️ 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 codex-google-drive-authorize-url

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.

@JanooGwan JanooGwan added the 기능 새로운 기능을 개발합니다. label Apr 1, 2026
@JanooGwan JanooGwan self-assigned this Apr 1, 2026
@JanooGwan JanooGwan requested a review from Copilot April 1, 2026 11:31
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Google Drive 권한 재연결 플로우에서 프론트엔드가 리다이렉트 없이도 바로 사용할 수 있도록, 로그인 사용자 기준 Google Drive OAuth authorize URL을 JSON으로 반환하는 API를 추가한 PR입니다.

Changes:

  • GET /auth/oauth/google/drive/authorize-url 엔드포인트 추가 및 authorizationUrl JSON 응답 제공
  • authorize URL 응답용 DTO(GoogleDriveAuthorizationUrlResponse) 추가
  • 신규 엔드포인트 동작을 검증하는 통합 테스트(GoogleDriveOAuthControllerTest) 추가

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
src/main/java/gg/agit/konect/infrastructure/oauth/GoogleDriveOAuthController.java authorize URL을 JSON으로 반환하는 신규 GET 엔드포인트 및 Swagger Operation/Tag 메타데이터 추가
src/main/java/gg/agit/konect/infrastructure/oauth/dto/GoogleDriveAuthorizationUrlResponse.java 프론트에서 그대로 사용할 authorizationUrl 응답 DTO(record) 추가
src/test/java/gg/agit/konect/integration/infrastructure/oauth/GoogleDriveOAuthControllerTest.java 로그인 사용자 기준 authorize URL JSON 응답을 반환하는지 통합 테스트 추가

@JanooGwan JanooGwan merged commit e6253cd into develop Apr 1, 2026
8 checks passed
@JanooGwan JanooGwan deleted the codex-google-drive-authorize-url branch April 1, 2026 11:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

기능 새로운 기능을 개발합니다.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants