Skip to content

[DEPLOY] production-release(v.0.2.8)#352

Merged
yaaan7 merged 5 commits into
mainfrom
develop
Jun 15, 2026
Merged

[DEPLOY] production-release(v.0.2.8)#352
yaaan7 merged 5 commits into
mainfrom
develop

Conversation

@yaaan7

@yaaan7 yaaan7 commented Jun 15, 2026

Copy link
Copy Markdown
Collaborator

🔗 Related Issue

✨ 작업 개요

작업 내용을 간략하게 작성해주세요.
v.0.2.8 배포

체크리스트

  • Reviewers, Assignees, Labels를 모두 등록했나요?
  • .gitignore 설정을 하였나요?
  • PR 머지 전 반드시 CI가 정상적으로 작동하는지 확인해주세요!

📷 이미지 첨부 (선택)

  • 작업 결과를 확인할 수 있는 이미지나 GIF를 첨부해주세요.
  • UI 변경, API 응답 샘플, 테스트 결과 등이 포함되면 좋아요!

🧐 집중 리뷰 요청

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

@yaaan7 yaaan7 self-assigned this Jun 15, 2026
@yaaan7 yaaan7 added the 🚀 deploy 배포 label Jun 15, 2026

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request updates the CARDNEWS feed retrieval logic to fetch policy and contest communities that contain card news images. It introduces a new repository query and maps the retrieved feed items to the CARDNEWS type. The reviewer suggested refactoring the manual mapping of CommunityFeedItemResDTO by adding a withKind helper method to the DTO, which would improve maintainability and prevent errors when fields are added or modified in the future.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment on lines +157 to +176
if (tab == CommunityTab.CARDNEWS) {
content = content.stream()
.map(item -> new CommunityFeedItemResDTO(
CommunityType.CARDNEWS,
item.communityId(),
item.pinId(),
item.title(),
item.content(),
item.thumbnailUrl(),
item.writerNickname(),
item.writerProfileUrl(),
item.detailAddress(),
item.viewCount(),
item.likeCount(),
item.discount(),
item.eventStartTime(),
item.eventEndTime()
))
.toList();
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

CommunityFeedItemResDTO 객체의 모든 필드를 수동으로 복사하여 CommunityType.CARDNEWSkind만 변경하는 방식은 유지보수 관점에서 취약합니다. 향후 CommunityFeedItemResDTO에 필드가 추가되거나 삭제, 타입 변경이 일어날 경우 이 부분의 생성자 호출 코드도 함께 수정해야 하므로 에러가 발생하기 쉽습니다.

이를 개선하기 위해 CommunityFeedItemResDTO 레코드 내부에 특정 필드만 변경하여 새로운 인스턴스를 반환하는 withKind와 같은 메서드를 추가하는 것을 권장합니다.

추천 개선 방향:

  1. CommunityFeedItemResDTO 레코드에 아래와 같은 메서드를 추가합니다:
public CommunityFeedItemResDTO withKind(CommunityType newKind) {
    return new CommunityFeedItemResDTO(
            newKind,
            this.communityId,
            this.pinId,
            this.title,
            this.content,
            this.thumbnailUrl,
            this.writerNickname,
            this.writerProfileUrl,
            this.detailAddress,
            this.viewCount,
            this.likeCount,
            this.discount,
            this.eventStartTime,
            this.eventEndTime
    );
}
  1. 서비스 레이어에서는 제공된 코드 제안과 같이 간결하게 처리할 수 있습니다.
        if (tab == CommunityTab.CARDNEWS) {
            content = content.stream()
                    .map(item -> item.withKind(CommunityType.CARDNEWS))
                    .toList();
        }

@yaaan7 yaaan7 merged commit 028d72e into main Jun 15, 2026
2 checks passed
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