Skip to content

feat: 기존 동아리 정보 수정 요청 API 추가#642

Merged
dh2906 merged 13 commits into
developfrom
feat/club-update-request
May 26, 2026
Merged

feat: 기존 동아리 정보 수정 요청 API 추가#642
dh2906 merged 13 commits into
developfrom
feat/club-update-request

Conversation

@dh2906
Copy link
Copy Markdown
Contributor

@dh2906 dh2906 commented May 26, 2026

🔍 개요

  • 기존 동아리에 대해서도 비로그인 사용자가 정보 수정 요청을 남길 수 있습니다.
  • 수정 요청은 동아리 등록 요청과 같은 입력 필드셋을 사용하며, 실제 웹 동아리 정보를 즉시 변경하지 않고 PENDING 상태로 저장됩니다.
  • 운영자는 Slack 알림에서 web_club 기준 현재값과 요청값을 비교할 수 있습니다.

🚀 주요 변경 내용

  • POST /clubs/{clubId}/information-update-requests API를 추가했습니다.
  • 수정 요청 대상은 web_club 기준으로 조회하고, 존재하지 않는 clubId 요청은 저장되지 않도록 했습니다.
  • 수정 요청 입력을 등록 요청과 동일하게 universityName, clubName, clubCategory, clubTopic, clubEmoji, shortDescription, fullIntroduction, imageUrls로 맞췄습니다.
  • club_information_update_requestclub_information_update_request_image 테이블을 추가해 요청 본문과 첨부 이미지 순서를 보존합니다.
  • 등록 요청과 같은 방식으로 트랜잭션 커밋 후 Slack 이벤트 알림을 발행합니다.
  • API 통합 테스트, 서비스 이벤트 발행 테스트, Slack 리스너/메시지 포맷 테스트를 추가했습니다.

💬 참고 사항

  • 검증 명령
    • ./gradlew test --tests gg.agit.konect.unit.domain.club.service.ClubRegistrationRequestServiceTest --tests gg.agit.konect.integration.domain.club.ClubRegistrationRequestApiTest --tests gg.agit.konect.unit.infrastructure.slack.listener.ClubRegistrationRequestSlackListenerTest --tests gg.agit.konect.unit.infrastructure.slack.service.SlackNotificationServiceTest
    • ./gradlew checkstyleMain
    • git diff --check

✅ Checklist (완료 조건)

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

Compound Engineering
GPT-5

dh2906 added 2 commits May 26, 2026 22:52
- 기존 동아리 정보를 바로 변경하지 않고 운영자가 확인할 수 있도록 수정 요청을 별도 테이블에 저장한다
- 동아리 등록 요청과 같은 공개 요청 저장 및 커밋 후 Slack 알림 패턴을 사용해 운영 알림 흐름을 맞춘다
- 존재하지 않는 동아리 ID로 요청이 저장되지 않도록 대상 동아리를 먼저 조회한다
- API, 서비스, Slack 위임, 메시지 포맷 테스트를 함께 추가해 요청 저장과 알림 흐름을 검증한다
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 26, 2026

Review Change Stack

Warning

Review limit reached

@dh2906, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 32 minutes and 12 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 48d5b317-7048-4c51-a788-b83160abec43

📥 Commits

Reviewing files that changed from the base of the PR and between 5bf82d0 and 504f602.

📒 Files selected for processing (7)
  • src/main/java/gg/agit/konect/domain/club/dto/ClubInformationUpdateRequestDto.java
  • src/main/java/gg/agit/konect/domain/club/model/ClubInformationUpdateRequest.java
  • src/main/java/gg/agit/konect/infrastructure/slack/enums/SlackMessageTemplate.java
  • src/main/java/gg/agit/konect/infrastructure/slack/service/SlackNotificationService.java
  • src/main/resources/db/migration/V81__create_club_information_update_request.sql
  • src/test/java/gg/agit/konect/integration/domain/club/ClubRegistrationRequestApiTest.java
  • src/test/java/gg/agit/konect/unit/infrastructure/slack/service/SlackNotificationServiceTest.java
📝 Walkthrough

개요

클럽 정보 업데이트 요청 기능이 추가되었습니다. REST API 엔드포인트에서 요청을 받아 도메인 모델로 저장하고 Slack으로 알림을 보내는 완전한 요청 처리 파이프라인이 구현되었습니다.

변경 사항

Club Information Update Request Feature

Layer / File(s) 요약
API 계약 및 요청 DTO
src/main/java/gg/agit/konect/domain/club/controller/ClubRegistrationRequestApi.java, ClubRegistrationRequestController.java, src/main/java/gg/agit/konect/domain/club/dto/ClubInformationUpdateRequestDto.java
POST /clubs/{clubId}/information-update-requests 엔드포인트가 추가되었습니다. API 인터페이스와 구현체에 requestClubInformationUpdate 메서드가 정의되고, ClubInformationUpdateRequestDto는 8개 필드(대학명, 동아리명, 분과, 주제, 이모지, 한 줄 소개, 상세 소개, 이미지 URL 목록)에 Swagger 메타데이터와 검증 제약(@NotBlank, @Size 등)을 포함합니다.
도메인 모델 및 저장소
src/main/java/gg/agit/konect/domain/club/model/ClubInformationUpdateRequest.java, ClubInformationUpdateRequestImage.java, src/main/java/gg/agit/konect/domain/club/repository/ClubInformationUpdateRequestRepository.java
두 개의 JPA 엔티티가 추가됩니다. ClubInformationUpdateRequest는 요청 메타데이터와 상태를 저장하며, ClubInformationUpdateRequestImage는 이미지 URL과 표시 순서를 관리합니다. addImages(List<String>) 메서드로 이미지를 동적으로 추가할 수 있으며, UpdateRequestStatus enum(PENDING, APPROVED, REJECTED)으로 상태를 관리합니다.
서비스 및 이벤트
src/main/java/gg/agit/konect/domain/club/service/ClubRegistrationRequestService.java, src/main/java/gg/agit/konect/domain/club/event/ClubInformationUpdateRequestedEvent.java
requestInformationUpdate(clubId, request) 메서드가 클럽을 조회하고, PENDING 상태의 엔티티를 생성한 뒤, 이미지를 첨부하고, 저장 후 ClubInformationUpdateRequestedEvent를 발행합니다. 이벤트는 현재/요청 상태를 모두 담아 16개 필드로 구성되며, from(ClubInformationUpdateRequest) 정적 메서드로 중첩 객체에서 값을 추출합니다.
Slack 알림
src/main/java/gg/agit/konect/infrastructure/slack/enums/SlackMessageTemplate.java, src/main/java/gg/agit/konect/infrastructure/slack/listener/ClubRegistrationRequestSlackListener.java, src/main/java/gg/agit/konect/infrastructure/slack/service/SlackNotificationService.java
handleClubInformationUpdateRequested 리스너가 @Async, @TransactionalEventListener 어노테이션으로 비동기/트랜잭션 커밋 후 실행됩니다. Slack 메시지 템플릿(CLUB_INFORMATION_UPDATE_REQUEST)은 요청 ID, 동아리 ID, 변경 전/후 데이터를 "변경 전 → 변경 후" 형식으로 포맷하며, SlackNotificationService.notifyClubInformationUpdateRequest 메서드가 메시지를 생성 후 전송합니다. 예외 발생 시 로깅되고 전파되지 않습니다.
데이터베이스 마이그레이션
src/main/resources/db/migration/V81__create_club_information_update_request.sql
club_information_update_request 테이블(메인 요청 메타데이터 저장, web_club_id 외래키)과 club_information_update_request_image 테이블(이미지 URL/순서 저장, 요청 삭제 시 연쇄 삭제)이 생성됩니다.
API 통합 테스트
src/test/java/gg/agit/konect/integration/domain/club/ClubRegistrationRequestApiTest.java
3가지 시나리오 검증: (1) 비로그인 사용자의 유효한 요청 생성 시 201 응답, (2) 미존재 동아리 요청 시 404 응답, (3) 필수 필드 누락 시 400 응답. createInformationUpdateRequest 헬퍼 메서드로 테스트 데이터를 생성합니다.
서비스 단위 테스트
src/test/java/gg/agit/konect/unit/domain/club/service/ClubRegistrationRequestServiceTest.java
requestInformationUpdatePublishesClubInformationUpdateRequestedEvent 테스트가 서비스 메서드 실행 후 이벤트 발행을 검증하고, 이벤트의 필드가 저장된 엔티티 및 입력 DTO 값과 일치하는지 확인합니다.
Slack 테스트
src/test/java/gg/agit/konect/unit/infrastructure/slack/listener/ClubRegistrationRequestSlackListenerTest.java, src/test/java/gg/agit/konect/unit/infrastructure/slack/service/SlackNotificationServiceTest.java
리스너가 이벤트를 SlackNotificationService로 위임하고 예외를 억제하는지 검증합니다. Slack 메시지 포맷팅 테스트는 마크다운, 이모지, 변경 전/후 데이터(요청 ID, 동아리 ID, 텍스트 필드, 이미지)를 고정 문자열로 검증합니다.

관련 PR

  • BCSDLab/KONECT_BACK_END#636: 같은 클럽 등록 요청 스택에 대한 이전 작업으로, 동일한 ClubRegistrationRequestApi, Controller, Service 구조를 확장합니다.

제안 라벨

기능

리뷰 복잡도 추정

🎯 3 (Moderate) | ⏱️ ~25분

축제 기념시

🐰 정보 수정 요청, 동아리 꿈을 키우네
Slack 알림 울려 퍼지고
변경 전 후 비교하며
JPA 엔티티 튼튼히 쌓아
요청 대기 중, PENDING 상태 맞춰! 🎉

🚥 Pre-merge checks | ✅ 4 | ❌ 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 (4 passed)
Check name Status Explanation
Title check ✅ Passed PR 제목이 변경 사항의 핵심을 명확하게 반영하고 있으며, 기존 동아리 정보 수정 요청 API 추가라는 주요 목표를 정확히 전달합니다.
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.
Description check ✅ Passed 풀 리퀘스트 설명은 새로운 동아리 정보 수정 요청 API 추가 기능과 관련된 명확한 개요, 주요 변경 내용, 테스트 항목들을 담고 있으며 변경셋과 직접적으로 일치합니다.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/club-update-request

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.

@dh2906 dh2906 self-assigned this May 26, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 26, 2026

🧪 JaCoCo Coverage Report (Changed Files)

Summary

  • Overall Coverage: 86.3% ✅
  • Covered Lines: 139 / 161
  • Changed Files: 11

Coverage by File

Class Coverage Lines Status
SlackNotificationService
gg.agit.konect.infrastructure.slack.service
58.5% 31/53 ⚠️
ClubInformationUpdateRequestedEvent
gg.agit.konect.domain.club.event
100.0% 21/21
ClubRegistrationRequestController
gg.agit.konect.domain.club.controller
100.0% 4/4
SlackMessageTemplate
gg.agit.konect.infrastructure.slack.enums
100.0% 12/12
ClubRegistrationRequestSlackListener
gg.agit.konect.infrastructure.slack.listener
100.0% 38/38
ClubRegistrationRequestService
gg.agit.konect.domain.club.service
100.0% 33/33

📊 View Workflow Run

dh2906 added 2 commits May 26, 2026 22:58
- 운영자가 수정 요청을 검토할 때 기존 값과 요청 값을 바로 비교할 수 있도록 Slack 이벤트 payload를 확장한다
- 동아리명뿐 아니라 분과, 한 줄 소개, 이미지, 위치, 상세 소개를 모두 현재 값에서 요청 값으로 표시한다
- 요청 저장 구조는 유지해 실제 동아리 정보가 즉시 변경되지 않는 기존 승인 흐름을 보존한다
- 이벤트 매핑과 Slack 메시지 포맷 테스트를 함께 수정해 비교 표시가 깨지지 않도록 한다
- Lombok builder 출력에 연관 엔티티의 기본 Object 문자열이 포함되지 않도록 club 필드를 제외한다
- 엔티티 매핑과 요청 저장 흐름은 그대로 유지해 리뷰 지적 범위만 최소 수정한다
- 디버그 문자열에서 의미 없는 객체 참조가 노출되는 상태를 방지한다
- 수정 요청에서 운영자가 확인하는 현재값을 앱용 club이 아니라 웹 노출용 web_club 기준으로 조회한다
- 요청 저장 FK도 web_club을 바라보게 맞춰 비교 대상과 저장 대상의 의미가 어긋나지 않도록 한다
- 기존 요청 저장과 Slack 알림 흐름은 유지하고 비교 기준만 웹 동아리 데이터로 좁힌다
- 통합 테스트와 서비스 테스트를 web_club fixture 기반으로 바꿔 API path의 clubId 해석을 고정한다
dh2906 added 2 commits May 26, 2026 23:15
- 수정 요청도 등록 요청과 같은 필드셋을 받도록 대학명, 주제, 이모지, 첨부 이미지 목록을 포함한다
- 요청 이미지 목록은 등록 요청과 같이 별도 이미지 테이블에 순서와 함께 저장한다
- 웹 동아리 현재값과 요청값 비교 알림은 등록 요청 필드 기준으로 재정렬한다
- 기존 위치와 로고 단일 URL 입력을 제거해 등록 요청과 수정 요청 계약이 달라지는 혼선을 줄인다
- 현재값과 요청값이 같은 항목은 단일 값으로 표시해 불필요한 비교 화살표를 줄인다
- 값이 달라진 항목만 초기값에서 변경값으로 이어지는 형태로 보여 운영자가 실제 변경 내용을 빠르게 볼 수 있게 한다
- 인라인 값과 긴 본문 값의 표시 방식을 분리해 Slack 메시지 가독성을 유지한다
Copy link
Copy Markdown

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/main/java/gg/agit/konect/infrastructure/slack/service/SlackNotificationService.java (1)

129-133: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

[LEVEL: low] 문제: Line 132에서 System.lineSeparator()를 사용해 Slack 메시지 개행이 실행 OS에 따라 달라집니다. 영향: 개발/CI/운영 환경이 다르면 메시지 문자열이 달라져 테스트 안정성과 메시지 일관성이 떨어질 수 있습니다. 제안: Slack 전송용 문자열은 \n 고정 개행(또는 String.join("\n", imageUrls))으로 통일해 주세요.

최소 수정 예시
-                builder.append(System.lineSeparator());
+                builder.append("\n");
🤖 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/main/java/gg/agit/konect/infrastructure/slack/service/SlackNotificationService.java`
around lines 129 - 133, The code in SlackNotificationService that builds the
image URL payload uses System.lineSeparator() (see the loop referencing
imageUrls and builder.append), which causes OS-dependent newlines; change this
to use a fixed '\n' newline (or replace the loop with String.join("\n",
imageUrls)) so the constructed Slack message is consistent across
environments—update the builder logic that appends imageUrls to use "\n" or
String.join("\n", imageUrls).
🤖 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.

Inline comments:
In
`@src/main/java/gg/agit/konect/domain/club/dto/ClubInformationUpdateRequestDto.java`:
- Around line 57-62: The imageUrls field in ClubInformationUpdateRequestDto only
validates the list size which allows null/empty/oversized URL strings to pass
and later cause DB constraint errors; update the declaration of imageUrls to
apply element-level bean validation (e.g., List<`@NotBlank` `@Size`(max = 500)
String> imageUrls) so each entry is non-blank and capped at 500 chars, and add
the necessary imports for the constraint annotations.

In
`@src/main/resources/db/migration/V81__create_club_information_update_request.sql`:
- Line 12: Add a non-blocking index on the status column of
club_information_update_request to speed up frequent queries filtering by
status: update the migration to create an index (e.g.,
idx_club_information_update_request_status) on status after the table creation
(or in a separate migration), ensuring the index name and target column are
correct and, if the table may be large in production, use a concurrent/online
index creation option supported by your RDBMS.
- Line 12: The status column in V81__create_club_information_update_request.sql
allows arbitrary strings (VARCHAR(20)) so add a DB-level constraint: either
create an ENUM type for status with values 'PENDING','APPROVED','REJECTED' and
use it for the status column (preserving DEFAULT 'PENDING'), or add a CHECK
constraint on the status column limiting values to those three; update the
CREATE TABLE statement (or an accompanying ALTER TABLE in the same migration) to
apply the chosen constraint so invalid states cannot be inserted at the DB
level.
- Around line 22-24: Add a composite unique constraint/index to prevent
duplicate display_order values per request by modifying the CREATE TABLE for
these columns: add a UNIQUE constraint on (request_id, display_order) (or a
UNIQUE INDEX) so the table enforces uniqueness for the pair of columns; update
the table definition that contains request_id and display_order to include this
constraint and ensure migrations will fail if duplicates already exist so data
must be deduplicated beforehand.

In
`@src/test/java/gg/agit/konect/integration/domain/club/ClubRegistrationRequestApiTest.java`:
- Around line 149-150: The test in ClubRegistrationRequestApiTest currently
hardcodes an ID (performPost("/clubs/999999/information-update-requests",
request)) that may become valid over time; change it to use a
guaranteed-nonexistent ID (e.g. Long.MAX_VALUE) or compute one dynamically
(create a club or query the repository for the current max ID and use max+1) and
use that value in the performPost call so the expectation status().isNotFound()
cannot be flakily violated.

---

Outside diff comments:
In
`@src/main/java/gg/agit/konect/infrastructure/slack/service/SlackNotificationService.java`:
- Around line 129-133: The code in SlackNotificationService that builds the
image URL payload uses System.lineSeparator() (see the loop referencing
imageUrls and builder.append), which causes OS-dependent newlines; change this
to use a fixed '\n' newline (or replace the loop with String.join("\n",
imageUrls)) so the constructed Slack message is consistent across
environments—update the builder logic that appends imageUrls to use "\n" or
String.join("\n", imageUrls).
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 55006ad0-51fe-42ca-a9e3-8b0cf1809bb3

📥 Commits

Reviewing files that changed from the base of the PR and between b7b2a23 and 5bf82d0.

📒 Files selected for processing (16)
  • src/main/java/gg/agit/konect/domain/club/controller/ClubRegistrationRequestApi.java
  • src/main/java/gg/agit/konect/domain/club/controller/ClubRegistrationRequestController.java
  • src/main/java/gg/agit/konect/domain/club/dto/ClubInformationUpdateRequestDto.java
  • src/main/java/gg/agit/konect/domain/club/event/ClubInformationUpdateRequestedEvent.java
  • src/main/java/gg/agit/konect/domain/club/model/ClubInformationUpdateRequest.java
  • src/main/java/gg/agit/konect/domain/club/model/ClubInformationUpdateRequestImage.java
  • src/main/java/gg/agit/konect/domain/club/repository/ClubInformationUpdateRequestRepository.java
  • src/main/java/gg/agit/konect/domain/club/service/ClubRegistrationRequestService.java
  • src/main/java/gg/agit/konect/infrastructure/slack/enums/SlackMessageTemplate.java
  • src/main/java/gg/agit/konect/infrastructure/slack/listener/ClubRegistrationRequestSlackListener.java
  • src/main/java/gg/agit/konect/infrastructure/slack/service/SlackNotificationService.java
  • src/main/resources/db/migration/V81__create_club_information_update_request.sql
  • src/test/java/gg/agit/konect/integration/domain/club/ClubRegistrationRequestApiTest.java
  • src/test/java/gg/agit/konect/unit/domain/club/service/ClubRegistrationRequestServiceTest.java
  • src/test/java/gg/agit/konect/unit/infrastructure/slack/listener/ClubRegistrationRequestSlackListenerTest.java
  • src/test/java/gg/agit/konect/unit/infrastructure/slack/service/SlackNotificationServiceTest.java
📜 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). (2)
  • GitHub Check: coverage
  • GitHub Check: Analyze (java-kotlin)
🧰 Additional context used
📓 Path-based instructions (6)
**/*.java

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

**/*.java: Java 코드에서 import로 해결할 수 있는 경우 FQCN(Full Qualified Class Name)을 사용하지 않도록 지적한다
JPA/QueryDSL 조회 변경 시 N+1, 잘못된 fetch join, count 쿼리 왜곡, pagination 깨짐, distinct 누락을 확인한다
권한 로직은 관리자 우회, 요청자와 대상자 관계, 클럽/채팅방/공지/일정의 소속 검증이 빠지지 않았는지 확인한다
soft delete, 탈퇴 사용자, 차단/제외 조건, 중복 제거가 필요한 조회에서는 응답에 노출되면 안 되는 데이터가 포함되는지 확인한다
DTO 응답 변경은 기존 클라이언트가 기대하는 필드명, nullability, enum/string 값, 정렬 순서를 깨지 않는지 확인한다
조건이 2개 이상 결합된 비즈니스 규칙, 권한 조건, soft delete 제외, 중복 제거, fallback 우선순위, 대표값 선택, DTO 변환, count 쿼리 분리, fetch join 선택 이유처럼 코드만으로 의도가 숨겨지는 지점에는 주석을 권장한다
단순 생성자 호출, 필드 매핑, 컬렉션 반환, 이름만으로 명확한 분기에는 주석을 요구하지 않는다

Files:

  • src/main/java/gg/agit/konect/domain/club/controller/ClubRegistrationRequestApi.java
  • src/main/java/gg/agit/konect/infrastructure/slack/enums/SlackMessageTemplate.java
  • src/main/java/gg/agit/konect/infrastructure/slack/service/SlackNotificationService.java
  • src/main/java/gg/agit/konect/domain/club/dto/ClubInformationUpdateRequestDto.java
  • src/test/java/gg/agit/konect/unit/infrastructure/slack/service/SlackNotificationServiceTest.java
  • src/main/java/gg/agit/konect/domain/club/repository/ClubInformationUpdateRequestRepository.java
  • src/main/java/gg/agit/konect/domain/club/controller/ClubRegistrationRequestController.java
  • src/main/java/gg/agit/konect/domain/club/event/ClubInformationUpdateRequestedEvent.java
  • src/test/java/gg/agit/konect/integration/domain/club/ClubRegistrationRequestApiTest.java
  • src/main/java/gg/agit/konect/domain/club/model/ClubInformationUpdateRequestImage.java
  • src/main/java/gg/agit/konect/domain/club/model/ClubInformationUpdateRequest.java
  • src/main/java/gg/agit/konect/infrastructure/slack/listener/ClubRegistrationRequestSlackListener.java
  • src/test/java/gg/agit/konect/unit/domain/club/service/ClubRegistrationRequestServiceTest.java
  • src/test/java/gg/agit/konect/unit/infrastructure/slack/listener/ClubRegistrationRequestSlackListenerTest.java
  • src/main/java/gg/agit/konect/domain/club/service/ClubRegistrationRequestService.java
**/*.{sql,java}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

데이터베이스 변경에서는 마이그레이션 순서, 기존 데이터 호환성, nullable/default 처리, 롤백 난이도, 인덱스 필요성을 확인한다

Files:

  • src/main/java/gg/agit/konect/domain/club/controller/ClubRegistrationRequestApi.java
  • src/main/resources/db/migration/V81__create_club_information_update_request.sql
  • src/main/java/gg/agit/konect/infrastructure/slack/enums/SlackMessageTemplate.java
  • src/main/java/gg/agit/konect/infrastructure/slack/service/SlackNotificationService.java
  • src/main/java/gg/agit/konect/domain/club/dto/ClubInformationUpdateRequestDto.java
  • src/test/java/gg/agit/konect/unit/infrastructure/slack/service/SlackNotificationServiceTest.java
  • src/main/java/gg/agit/konect/domain/club/repository/ClubInformationUpdateRequestRepository.java
  • src/main/java/gg/agit/konect/domain/club/controller/ClubRegistrationRequestController.java
  • src/main/java/gg/agit/konect/domain/club/event/ClubInformationUpdateRequestedEvent.java
  • src/test/java/gg/agit/konect/integration/domain/club/ClubRegistrationRequestApiTest.java
  • src/main/java/gg/agit/konect/domain/club/model/ClubInformationUpdateRequestImage.java
  • src/main/java/gg/agit/konect/domain/club/model/ClubInformationUpdateRequest.java
  • src/main/java/gg/agit/konect/infrastructure/slack/listener/ClubRegistrationRequestSlackListener.java
  • src/test/java/gg/agit/konect/unit/domain/club/service/ClubRegistrationRequestServiceTest.java
  • src/test/java/gg/agit/konect/unit/infrastructure/slack/listener/ClubRegistrationRequestSlackListenerTest.java
  • src/main/java/gg/agit/konect/domain/club/service/ClubRegistrationRequestService.java
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/domain/club/controller/ClubRegistrationRequestApi.java
  • src/main/java/gg/agit/konect/infrastructure/slack/enums/SlackMessageTemplate.java
  • src/main/java/gg/agit/konect/infrastructure/slack/service/SlackNotificationService.java
  • src/main/java/gg/agit/konect/domain/club/dto/ClubInformationUpdateRequestDto.java
  • src/main/java/gg/agit/konect/domain/club/repository/ClubInformationUpdateRequestRepository.java
  • src/main/java/gg/agit/konect/domain/club/controller/ClubRegistrationRequestController.java
  • src/main/java/gg/agit/konect/domain/club/event/ClubInformationUpdateRequestedEvent.java
  • src/main/java/gg/agit/konect/domain/club/model/ClubInformationUpdateRequestImage.java
  • src/main/java/gg/agit/konect/domain/club/model/ClubInformationUpdateRequest.java
  • src/main/java/gg/agit/konect/infrastructure/slack/listener/ClubRegistrationRequestSlackListener.java
  • src/main/java/gg/agit/konect/domain/club/service/ClubRegistrationRequestService.java
**/*

⚙️ CodeRabbit configuration file

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

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

Files:

  • src/main/java/gg/agit/konect/domain/club/controller/ClubRegistrationRequestApi.java
  • src/main/resources/db/migration/V81__create_club_information_update_request.sql
  • src/main/java/gg/agit/konect/infrastructure/slack/enums/SlackMessageTemplate.java
  • src/main/java/gg/agit/konect/infrastructure/slack/service/SlackNotificationService.java
  • src/main/java/gg/agit/konect/domain/club/dto/ClubInformationUpdateRequestDto.java
  • src/test/java/gg/agit/konect/unit/infrastructure/slack/service/SlackNotificationServiceTest.java
  • src/main/java/gg/agit/konect/domain/club/repository/ClubInformationUpdateRequestRepository.java
  • src/main/java/gg/agit/konect/domain/club/controller/ClubRegistrationRequestController.java
  • src/main/java/gg/agit/konect/domain/club/event/ClubInformationUpdateRequestedEvent.java
  • src/test/java/gg/agit/konect/integration/domain/club/ClubRegistrationRequestApiTest.java
  • src/main/java/gg/agit/konect/domain/club/model/ClubInformationUpdateRequestImage.java
  • src/main/java/gg/agit/konect/domain/club/model/ClubInformationUpdateRequest.java
  • src/main/java/gg/agit/konect/infrastructure/slack/listener/ClubRegistrationRequestSlackListener.java
  • src/test/java/gg/agit/konect/unit/domain/club/service/ClubRegistrationRequestServiceTest.java
  • src/test/java/gg/agit/konect/unit/infrastructure/slack/listener/ClubRegistrationRequestSlackListenerTest.java
  • src/main/java/gg/agit/konect/domain/club/service/ClubRegistrationRequestService.java
**/db/migration/*.sql

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Flyway 마이그레이션 파일은 파일명 버전 순서, 기존 운영 데이터 backfill, NOT NULL 추가 순서, 기본값 처리를 확인한다

Files:

  • src/main/resources/db/migration/V81__create_club_information_update_request.sql
src/main/resources/db/migration/**/*.sql

⚙️ CodeRabbit configuration file

src/main/resources/db/migration/**/*.sql: Flyway 마이그레이션 리뷰 규칙:

  • 버전 파일명 규칙(V{number}__{description}.sql) 위반 여부를 우선 확인한다.
  • 이미 배포된 마이그레이션 수정/재번호 부여 위험이 있으면 반드시 차단 코멘트를 남긴다.
  • 파괴적 변경(drop, rename 등)은 롤백 가능성과 운영 영향 관점에서 검토한다.

Files:

  • src/main/resources/db/migration/V81__create_club_information_update_request.sql
🧠 Learnings (1)
📚 Learning: 2026-05-18T05:03:20.120Z
Learnt from: dh2906
Repo: BCSDLab/KONECT_BACK_END PR: 625
File: src/main/java/gg/agit/konect/domain/website/dto/WebsiteClubsResponse.java:0-0
Timestamp: 2026-05-18T05:03:20.120Z
Learning: 응답 DTO(또는 그 하위 클래스)의 필드에 `Schema(requiredMode = REQUIRED)`(또는 OpenAPI에서 필드를 required로 문서화)한다고 가정한 경우, 실제 런타임 계약이 비어있지 않음을 코드/DB로 보장해야 합니다. 구체적으로는 해당 값이 매핑되는 DB 컬럼이 `NOT NULL`이고(필요 시 Flyway 마이그레이션에서 기존 행 백필 후 `NOT NULL` 전환), 엔티티/필드에 `NotNull` 및 `Column(nullable = false)`(또는 동등한 검증/매핑 제약)가 선언되어 있으며, DTO/응답에서도 null이 허용되지 않도록 보장(검증/타입)하세요. 이 제약이 없는 상태에서 required로 문서화하면 리뷰 시 불일치로 플래그합니다.

Applied to files:

  • src/main/java/gg/agit/konect/domain/club/dto/ClubInformationUpdateRequestDto.java

Comment thread src/main/java/gg/agit/konect/domain/club/dto/ClubInformationUpdateRequestDto.java Outdated
@dh2906 dh2906 added the 기능 새로운 기능을 개발합니다. label May 26, 2026
dh2906 added 3 commits May 26, 2026 23:32
- 수정 요청 이미지 URL 원소에도 빈 값과 길이 제한을 적용해 잘못된 URL이 저장되지 않도록 정리
- 요청별 이미지 표시 순서가 중복 저장되지 않도록 DB 유니크 제약을 추가
- 존재하지 않는 동아리 테스트가 임의 숫자에 의존하지 않도록 경계값을 사용
- 수정 요청 엔티티의 문자열 출력에서 웹 동아리 참조가 노출되지 않도록 안전한 toString 생성을 명시
- 수정 요청 상태값이 허용된 enum 값으로만 저장되도록 DB 제약을 추가
dh2906 added 2 commits May 26, 2026 23:39
- API 요청 타입에서 Dto 접미사를 제거해 기존 요청 DTO 네이밍과 맞춤
- 같은 이름의 저장 모델과 충돌하지 않도록 엔티티 타입을 명시적으로 분리
- 서비스와 테스트 참조를 새 타입명에 맞춰 정리해 FQCN 없이 읽히도록 유지
@Column(name = "status", length = 20, nullable = false)
private UpdateRequestStatus status;

@Builder
@dh2906 dh2906 merged commit c04a980 into develop May 26, 2026
5 checks passed
@dh2906 dh2906 deleted the feat/club-update-request branch May 26, 2026 14:45
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.

1 participant