Skip to content

Conversation

@JjungminLee
Copy link
Collaborator

No description provided.

* refactor: amount rating, taste rating 제거

* refactor: 안쓰는 메서드 제거

* docs: local yml 규칙 추가

* fix: 평균 별점 계산 안되는 문제 수정

* docs: local yml 제거

* chore: beer->pub
@JjungminLee JjungminLee self-assigned this Sep 6, 2025
Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Summary of Changes

Hello @JjungminLee, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

이 PR은 애플리케이션의 리뷰 평점 시스템을 간소화하는 데 중점을 둡니다. 기존의 맛 평점과 양 평점을 제거하고, 메인 평점만을 사용하도록 데이터 모델, DTO, 서비스 로직 및 관련 계산기를 업데이트했습니다. 또한, 로컬 개발 환경 설정을 개선하고 일부 열거형 이름을 변경했습니다.

Highlights

  • 평점 시스템 간소화: 기존의 맛 평점과 양 평점을 제거하고, 모든 리뷰 평점을 단일 '메인' 평점으로 통합하여 시스템을 간소화했습니다.
  • 로컬 개발 환경 설정 변경: 로컬 개발 환경의 데이터베이스 연결 정보를 환경 변수 대신 application-local.yml 파일에 직접 명시하도록 변경했습니다.
  • 열거형 이름 변경: RestaurantType 열거형의 BEER 값을 PUB으로 변경하여 명확성을 높였습니다.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in issue comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.


코드 간소화, 평점 하나로 충분해, 깔끔한 변화.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

v2.0.5 릴리즈를 위한 PR을 검토했습니다. 전반적으로 tasteRatingamountRating을 제거하고 mainRating만 남기는 리팩토링이 코드베이스 전체에 일관성 있게 적용되었습니다. 특히, 기존 rating 필드와 새로운 ratings 객체를 모두 지원하여 마이그레이션 기간 동안 발생할 수 있는 문제를 잘 처리한 점이 인상적입니다.

하지만, 한 가지 매우 중요한 보안 문제가 발견되었습니다. application-local.yml 파일에 데이터베이스 접속 정보를 하드코딩하여 커밋한 것은 심각한 보안 취약점입니다. 이 부분은 즉시 수정되어야 합니다. 또한, 코드 중복을 줄일 수 있는 부분에 대한 개선 제안도 포함하였으니, 자세한 내용은 아래 개별 코멘트를 참고해주세요.

Comment on lines +9 to +11
url: jdbc:mysql://eatssu-db.cf0ackgagqzb.ap-northeast-2.rds.amazonaws.com/dev
username: admin
password: ssu2023!

Choose a reason for hiding this comment

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

critical

데이터베이스 연결 정보를 환경 변수에서 하드코딩된 값으로 변경하셨습니다. 보안상 매우 위험한 변경입니다. 비밀번호와 같은 민감한 정보가 버전 관리 시스템에 노출되어서는 안 됩니다. 이전처럼 환경 변수를 사용하도록 코드를 되돌려야 합니다.

    url: ${EATSSU_DB_URL_DEV}
    username: ${EATSSU_DB_USERNAME}
    password: ${EATSSU_DB_PASSWORD}

.env
.env

/src/main/resources/application-local.yml

Choose a reason for hiding this comment

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

medium

.gitignoreapplication-local.yml 파일을 추가하여 버전 관리에서 제외하도록 설정하셨지만, 이번 PR에서 해당 파일의 변경사항이 커밋에 포함되었습니다. 이로 인해 .gitignore 설정이 의도한 대로 동작하지 않고 민감한 정보가 노출될 수 있습니다. application-local.yml 파일의 변경 사항을 커밋에서 제외하고, Git 추적에서 제거해야 합니다. git rm --cached src/main/resources/application-local.yml 명령어를 사용하여 추적을 중단할 수 있습니다.

Comment on lines +118 to +122
.map(r -> {
Integer main = (r.getRatings() != null) ? r.getRatings()
.getMainRating() : null;
return (main != null) ? main : r.getRating();
})

Choose a reason for hiding this comment

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

medium

리뷰의 유효 평점을 가져오는 이 로직이 ReviewRatingCount.from() 메소드와 findMenuReviews(), findMealReviews() 메소드에서도 동일하게 반복되고 있습니다. 코드 중복을 줄이고 유지보수성을 높이기 위해 이 로직을 Review 엔티티의 메소드(예: getEffectiveRating())로 추출하는 것을 고려해 보세요. 이렇게 하면 여러 위치에서 동일한 로직을 재사용할 수 있습니다.

@JjungminLee JjungminLee merged commit 903bc47 into main Sep 6, 2025
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants