fix: bound github issue comment views (#915)
Co-authored-by: Codex <codex@noreply.local>
This commit is contained in:
@@ -5,13 +5,18 @@ import { bodySha, preview, previewLines } from "./auth-and-safety";
|
||||
import type { GitHubComment } from "./types";
|
||||
|
||||
export function commentSummary(comment: GitHubComment): Record<string, unknown> {
|
||||
const body = comment.body ?? "";
|
||||
return {
|
||||
id: comment.id,
|
||||
body: comment.body ?? "",
|
||||
body,
|
||||
url: comment.html_url,
|
||||
author: comment.user?.login ?? null,
|
||||
createdAt: comment.created_at ?? null,
|
||||
updatedAt: comment.updated_at ?? null,
|
||||
bodyChars: body.length,
|
||||
bodySha: bodySha(body),
|
||||
bodyOmitted: false,
|
||||
fullBodyIncluded: true,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user