Skip to content

Conversation

@lepitaaar
Copy link
Contributor

@lepitaaar lepitaaar commented Nov 22, 2025

#️⃣연관된 이슈

#864

📝작업 내용

지원서 양식에 ApplicationFormMode 필드와 externalApplicationUrl이 추가되었습니다.
clubDetail에 존재하던 externalApplicationUrl은 기능 추가이후 나중에 삭제하면 될것 같습니다.

바뀐 필드에 맞게 mode와 question, externalurl을 응답해주게 변경하였고 기존에 dto에 있던 검증 어노테이션들이 조건에 따라 바뀌는 상황이 존재해 AsserTrue를 이용해 수동검사로 옮겼습니다.

또한 외부지원서는 구글폼, 네이버 폼 형식으로 시작하는지 검사합니다.

추가로 지원서 생성시에 중복된 응답 필드가 존재하는지 검사하는 로직이 빠져있어 중복된 필드를 검증하는 로직이 추가되었습니다

중점적으로 리뷰받고 싶은 부분(선택)

리뷰어가 특별히 봐주었으면 하는 부분이 있다면 작성해주세요

ex) 메서드 XXX의 이름을 더 잘 짓고 싶은데 혹시 좋은 명칭이 있을까요?

논의하고 싶은 부분(선택)

논의하고 싶은 부분이 있다면 작성해주세요.

🫡 참고사항

@lepitaaar lepitaaar self-assigned this Nov 22, 2025
@lepitaaar lepitaaar added ✨ Feature 기능 개발 🔨 Refactor 코드 리팩토링 💾 BE Backend labels Nov 22, 2025
@vercel
Copy link

vercel bot commented Nov 22, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
moadong Ready Ready Preview Comment Nov 22, 2025 4:31pm

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 22, 2025

Warning

Rate limit exceeded

@lepitaaar has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 11 minutes and 18 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, 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 have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between 3346f99 and 042940a.

📒 Files selected for processing (10)
  • backend/src/main/java/moadong/club/controller/ClubApplyPublicController.java (1 hunks)
  • backend/src/main/java/moadong/club/entity/ClubApplicationForm.java (3 hunks)
  • backend/src/main/java/moadong/club/enums/ApplicationFormMode.java (1 hunks)
  • backend/src/main/java/moadong/club/payload/request/ClubApplicationFormCreateRequest.java (2 hunks)
  • backend/src/main/java/moadong/club/payload/request/ClubApplicationFormEditRequest.java (2 hunks)
  • backend/src/main/java/moadong/club/payload/response/ClubApplicationFormResponse.java (2 hunks)
  • backend/src/main/java/moadong/club/service/ClubApplyAdminService.java (3 hunks)
  • backend/src/main/java/moadong/club/service/ClubApplyPublicService.java (3 hunks)
  • backend/src/main/java/moadong/global/exception/ErrorCode.java (1 hunks)
  • backend/src/test/java/moadong/fixture/ClubApplicationEditFixture.java (2 hunks)

Warning

.coderabbit.yaml has a parsing error

The CodeRabbit configuration file in this repository has a parsing error and default settings were used instead. Please fix the error(s) in the configuration file. You can initialize chat with CodeRabbit to get help with the configuration file.

💥 Parsing errors (1)
Validation error: Invalid regex pattern for base branch. Received: "**" at "reviews.auto_review.base_branches[0]"
⚙️ Configuration instructions
  • Please see the configuration documentation for more information.
  • You can also validate your configuration using the online YAML validator.
  • 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
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feature/#864-add-external-url-application-MOA-364

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.

@github-actions
Copy link

github-actions bot commented Nov 22, 2025

Test Results

68 tests   65 ✅  14s ⏱️
11 suites   3 💤
11 files     0 ❌

Results for commit 042940a.

♻️ This comment has been updated with latest results.

Copy link
Member

@seongwon030 seongwon030 left a comment

Choose a reason for hiding this comment

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

고생하셨습니당 슬쩍 리뷰해봤어요


public void updateExternalApplicationUrl(String externalApplicationUrl) {
boolean allowed = Arrays.stream(externalApplicationUrlAllowed)
.anyMatch(externalApplicationUrl::startsWith);
Copy link
Member

Choose a reason for hiding this comment

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

startsWith 보단 hostname으로 비교하는 건 어떨까요 ?

추가로 Array로 순회하는건 현재는 괜찮을 것 같은데 추후 성능 문제를 고려해봐도 좋을 부분인 것 같습니다.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

허용하는 호스트가 많지않아서 성능적인 문제가 생길꺼라 생각이 들진않았습니다!. 만약 Array를 순환하는 구조가 아니면 어떻게 구현할 수 있을까요?
또한 url에서 hostname을 어떻게 추출할 수 있을지도 같이생각해보면 좋을꺼같네요!

Copy link
Member

Choose a reason for hiding this comment

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

생각해보니 배열 순회 이외엔 최적화할 부분이 필요한가 하는 생각이 드네요.. 가장 실용적인 방법 같아서 따로 변경할 필요는 없을 것 같습니다.

hostname은 /나 ?로 끝나는지 정규식으로 검사하는 방법이 있을 것 같아요.

Comment on lines +264 to +265
Set<ClubApplyQuestion.QuestionItem> distinctQuestionItemList = new HashSet<>(question.items());
if (distinctQuestionItemList.size() != question.items().size()) throw new RestApiException(ErrorCode.DUPLICATE_QUESTIONS_ITEMS);
Copy link
Member

Choose a reason for hiding this comment

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

JS에선 중복요소 없앨 때 set을 쓰는데 java에서 쓰는 HashSet은 어떤 차이가 있나요

Copy link
Contributor Author

Choose a reason for hiding this comment

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

단순히 HashSet은 java내에서 Set 자료형을 기능을 구현한 구현체입니다. JS와 Java모두 기본적으로 hash table 기반이라 기능적인 차이는없습니다~

Copy link
Member

Choose a reason for hiding this comment

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

둘 다 비슷하군여 감사합니다

Copy link
Collaborator

@alsdddk alsdddk left a comment

Choose a reason for hiding this comment

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

수고하셨습니다!!
@AssertTrue 활용한 부분 정말 좋은 것 같아요.
외부 지원서 형식 검증이 강화돼서 전체 서비스 품질도 더 올라간 느낌이고,
보안(?) 측면에서도 한층 더 안심할 수 있게 된 것 같아요 🙌

@Getter
@Builder(toBuilder = true)
public class ClubApplicationForm implements Persistable<String> {
private static String[] externalApplicationUrlAllowed = {"https://forms.gle", "https://docs.google.com/forms", "https://form.naver.com", "https://naver.me"};
Copy link
Collaborator

Choose a reason for hiding this comment

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

좋네요 👍

SemesterTerm semesterTerm
) {

@AssertTrue(message = "지원서 양식에 필요한 필드가 누락되었습니다.")
Copy link
Collaborator

Choose a reason for hiding this comment

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

옹 저 이건 처음 써보는 거 같아요. 이런게 있었다니,, 몰랐는데 두개 이상의 필드를 검증하는데 매우매우 유용하군요 좋습니다~

ClubApplicationForm clubApplicationForm = clubApplicationFormsRepository.findByClubIdAndId(clubId, applicationFormId).orElseThrow(() -> new RestApiException(ErrorCode.APPLICATION_NOT_FOUND));

if (clubApplicationForm.getFormMode() == ApplicationFormMode.EXTERNAL)
throw new RestApiException(ErrorCode.APPLICATION_NOT_FOUND);
Copy link
Collaborator

Choose a reason for hiding this comment

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

아예 위 코드에서 clubApplicationForm 을 조회할 때부터 INTERNAL 폼만 가져오도록
findByClubIdAndIdOnFormModeINTERNAL 같은 메서드를 쓰는 건 어떨까용? (메서드 명은 예시입니다)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

오 내부지원서만 가져오게 변경하면 좋을꺼같네요~ 추후 리팩토링해보죠

Copy link
Member

@seongwon030 seongwon030 left a comment

Choose a reason for hiding this comment

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

고생하셨습니다

@lepitaaar lepitaaar merged commit a92091b into develop/be Nov 27, 2025
5 checks passed
@lepitaaar lepitaaar deleted the feature/#864-add-external-url-application-MOA-364 branch January 4, 2026 07:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

💾 BE Backend ✨ Feature 기능 개발 🔨 Refactor 코드 리팩토링

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants