Skip to content

feat: PR 알림 링크를 PR 루트 대신 코멘트/리뷰 위치로#6

Open
dohyun-ko wants to merge 1 commit into
mainfrom
dohyun-ko/deep-link-to-comment
Open

feat: PR 알림 링크를 PR 루트 대신 코멘트/리뷰 위치로#6
dohyun-ko wants to merge 1 commit into
mainfrom
dohyun-ko/deep-link-to-comment

Conversation

@dohyun-ko
Copy link
Copy Markdown
Member

@dohyun-ko dohyun-ko commented May 18, 2026

2022년 단테의 피드백 반영
https://channel.works/root/threads/groups/InHouse-66588/6243fac28cfc90440359/6243fac28cfc90440359

Summary

사용자 피드백 반영: PR 알림 title 의 'pull request' 링크를 PR root URL 대신 해당 코멘트/리뷰 anchor URL 로 변경. 리뷰가 많은 PR 에서 새로 등록된 코멘트 위치를 바로 찾을 수 있도록 개선.

Changes

  • `IssueCommentCreated` (PR Conversation / 이슈 코멘트): `event.Issue.GetHTMLURL` → `event.Comment.GetHTMLURL` (`#issuecomment-XYZ` 앵커 포함)
  • `PullRequestReviewEventSubmitted` (Review submit): `event.PullRequest.GetHTMLURL` → `event.Review.GetHTMLURL` (`#pullrequestreview-XYZ` 앵커 포함)

Notes

  • inline diff 코멘트 핸들러 (별도 PR feat: PR diff inline 코멘트 알림 핸들러 추가 #5) 는 이미 `event.Comment.GetHTMLURL` 사용 중이라 변경 없음
  • 다른 PR 이벤트 (opened/closed/ready_for_review/review_requested/assigned/synchronize) 는 특정 코멘트 anchor 가 없으므로 기존 PR root URL 유지

Test plan

  • PR 에 conversation 코멘트 달면 알림 링크가 해당 코멘트로 점프하는지 확인
  • PR Review (Approve/Comment/Request changes) submit 시 알림 링크가 해당 review block 으로 점프하는지 확인
  • 이슈 코멘트도 동일하게 동작 확인

🤖 Generated with Claude Code

Summary by CodeRabbit

릴리스 노트

  • 버그 수정
    • 이슈 댓글 알림에서 링크가 정확한 댓글로 이동하도록 수정
    • 풀 리퀘스트 리뷰 알림에서 링크가 정확한 리뷰로 이동하도록 수정

Review Change Stack

PR 알림 title 의 'pull request' 링크를 PR root URL 대신 해당 코멘트/리뷰
anchor URL 로 변경. 리뷰가 많은 PR 에서 새로 등록된 리뷰 위치를 바로
찾을 수 있도록 개선.

- IssueCommentCreated: event.Issue.GetHTMLURL → event.Comment.GetHTMLURL
  (#issuecomment-XYZ 앵커)
- PullRequestReviewEventSubmitted: event.PullRequest.GetHTMLURL → event.Review.GetHTMLURL
  (#pullrequestreview-XYZ 앵커)

inline diff 코멘트 (PullRequestReviewCommentEventCreated) 는 별도 PR 에서
이미 event.Comment.GetHTMLURL 사용.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@channeltalk
Copy link
Copy Markdown

channeltalk Bot commented May 18, 2026

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 18, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: c72a7d7d-30d9-45e4-b68e-e6c0ac28811c

📥 Commits

Reviewing files that changed from the base of the PR and between ae0d086 and 45ee921.

📒 Files selected for processing (2)
  • internal/event/callback/issue.go
  • internal/event/callback/pull_request.go

Walkthrough

이벤트 콜백에서 메시지 제목에 포함되는 링크의 URL 소스를 변경했습니다. 이슈 댓글 메시지는 Issue에서 Comment로, 풀 리퀘스트 리뷰 메시지는 PullRequest에서 Review로 변경되어, 각 메시지가 더 정확한 엔티티로 직접 링크됩니다.

Changes

Event message link URL refactoring

Layer / File(s) Summary
Event message link URL sources
internal/event/callback/issue.go, internal/event/callback/pull_request.go
이슈 댓글 생성 시 제목 링크가 Issue URL에서 Comment URL로 변경되고, 풀 리퀘스트 리뷰 이벤트의 제목 링크가 PullRequest URL에서 Review URL로 변경되었습니다.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Possibly related PRs

  • channel-io/cht-app-github#3: 동일한 IssueCommentCreated.buildMessage 메서드에서 댓글 알림 메시지 생성 로직을 함께 개선합니다.

Suggested reviewers

  • gwolves
  • huGgW
  • Dylan-KW

Poem

🐰 Comment와 Review의 참된 URL로,
정확한 링크를 따라가네요.
이슈와 PR의 깊은 곳까지,
메시지는 이제 제자리를 찾았어요! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed PR 제목이 변경 내용을 명확하게 반영하고 있습니다. 코멘트/리뷰 위치로 링크를 변경하는 핵심 내용을 정확히 설명합니다.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.

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

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch dohyun-ko/deep-link-to-comment

Comment @coderabbitai help to get the list of available commands and usage tips.

@dohyun-ko dohyun-ko marked this pull request as ready for review May 18, 2026 08:51
@dohyun-ko dohyun-ko requested a review from Dylan-KW May 18, 2026 08:51
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.

1 participant