Skip to content

Commit 5b28e91

Browse files
dohyun-koclaude
andauthored
feat: include review body in PR review notifications (#4)
Approve/Comment/Request changes 시 본문이 있으면 100 rune 이내로 잘라서 escape 후 두 번째 블록으로 첨부. 본문이 비어있으면 추가하지 않음. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent b0c8a62 commit 5b28e91

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

internal/event/callback/pull_request.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -234,9 +234,11 @@ func (cb *PullRequestReviewEventSubmitted) buildMessage(ctx context.Context, ins
234234
title = fmt.Sprintf(pullRequestReviewCommentedTitleFormat, mentionTexts.String(), model.InlineLink(event.Review.GetHTMLURL(), "pull request"), senderManager)
235235
}
236236

237-
return model.NewMessage(
238-
model.NewTextBlock(title),
239-
), nil
237+
blocks := []model.MessageBlock{model.NewTextBlock(title)}
238+
if body := truncateRunes(event.Review.GetBody(), commentBodyMaxRunes); body != "" {
239+
blocks = append(blocks, model.NewTextBlock(model.EscapedString(body)))
240+
}
241+
return model.NewMessage(blocks...), nil
240242
}
241243

242244
func NewPullRequestEventReviewRequested(commonSvc *svc.CommonSvc, issueSvc *svc.IssueSvc) *PullRequestEventReviewRequested {

0 commit comments

Comments
 (0)