Conversation
개요Slack 알림 메시지의 상세 보기 링크를 버튼 블록 형식에서 마크다운 하이퍼링크 형식으로 변경하여 모든 환경에서 일관되게 렌더링되도록 개선했습니다. 변경 사항Slack 링크 렌더링 개선
예상 코드 리뷰 노력🎯 2 (Simple) | ⏱️ ~12분 제안 레이블
시인의 한 마디
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. 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. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/test/java/org/sopt/makers/service/SlackNotificationServiceTest.java (1)
52-73: ⚡ Quick win
webUrl누락 분기(null/blank)도 테스트로 고정해 주세요.현재는 URL 존재 케이스만 검증하고 있어, Line 150-152 fallback 경로 회귀를 잡기 어렵습니다. null/blank 입력 시 마지막 블록 텍스트가
상세 보기(링크 아님)로 내려가는지 테스트를 1개 추가하는 것을 권장합니다.예시 테스트 추가
+ `@Test` + `@DisplayName`("Sentry URL이 없으면 상세 보기 텍스트만 전송한다") + void sendNotification_shouldRenderIssueLinkFallbackTextWhenWebUrlMissing() throws Exception { + SentryEventDetail eventDetail = new SentryEventDetail( + "0000000000", + " ", + "Unexpected server error: ", + "2026-05-13T17:58:41.158000Z", + "error", + "Exception: Sentry test exception" + ); + + slackNotificationService.sendNotification("beat", "be", "dev", eventDetail, slackWebhookUrl()); + + JsonNode blocks = extractBlocksFromSlackRequest(); + JsonNode issueLinkBlock = blocks.get(blocks.size() - 1); + assertThat(issueLinkBlock.path("text").path("text").asText()).isEqualTo("상세 보기"); + }🤖 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/test/java/org/sopt/makers/service/SlackNotificationServiceTest.java` around lines 52 - 73, Add a new unit test alongside sendNotification_shouldRenderIssueLinkAsMarkdownText that covers the webUrl missing branch: create an eventDetail via sentryEventDetail() but set its webUrl to null and another test for blank (or a parameterized test) and call slackNotificationService.sendNotification(...). Then extract blocks with extractBlocksFromSlackRequest() and assert there is no "actions" block and that the final block's text is exactly "상세 보기" (no link markup), referencing the existing test helpers (sentryEventDetail, slackNotificationService, extractBlocksFromSlackRequest) to verify the fallback behavior when webUrl is null/blank.
🤖 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.
Nitpick comments:
In `@src/test/java/org/sopt/makers/service/SlackNotificationServiceTest.java`:
- Around line 52-73: Add a new unit test alongside
sendNotification_shouldRenderIssueLinkAsMarkdownText that covers the webUrl
missing branch: create an eventDetail via sentryEventDetail() but set its webUrl
to null and another test for blank (or a parameterized test) and call
slackNotificationService.sendNotification(...). Then extract blocks with
extractBlocksFromSlackRequest() and assert there is no "actions" block and that
the final block's text is exactly "상세 보기" (no link markup), referencing the
existing test helpers (sentryEventDetail, slackNotificationService,
extractBlocksFromSlackRequest) to verify the fallback behavior when webUrl is
null/blank.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: a2167603-ff0e-4f06-beb5-774dc49a3e92
📒 Files selected for processing (2)
src/main/java/org/sopt/makers/service/SlackNotificationService.javasrc/test/java/org/sopt/makers/service/SlackNotificationServiceTest.java
Related issue 🛠
Work Description ✏️
button/actions블록 대신mrkdwn링크 텍스트로 전송하도록 수정했습니다.sentry.example.com기반 더미 URL과 더미 issue/event id를 사용하도록 테스트 데이터를 정리했습니다.actions/button블록이 포함되지 않고,section블록의mrkdwn링크로상세 보기가 전송되는지 확인했습니다.Trouble Shooting ⚽️
mrkdwn링크로 전환하여 상세 보기 링크가 더 안정적으로 노출되도록 개선했습니다.