feat(api): expose review markdown body in Review objects

This commit is contained in:
Prad Nukala committed 2026-09-30 16:31:06 -04:00
1 parent d722feda1c
commit ffa8a11f51
1 file changed
+6 -2
+6 -2
View File
@@ -13,7 +13,7 @@
* layer, the way apps/cli already imports srs.ts.
*
* Library: side-effect-free on import; the caller passes its GitHub client —
* the Worker's or the CLI's, which share the three members used here.
* the Worker's or the CLI's, which share the two members used here.
*/
import type { GitHub } from "./github.ts";
@@ -35,6 +35,8 @@ export interface Review {
number: number;
title: string;
open: boolean;
/** Markdown body: `**Scheduled:**` / `**Phase:**` / `**Load:**` lines the release reads. */
body: string;
/** Sub-issues in the order GitHub lists them (the solve order). */
problems: (Problem & { fromTopic: number | null })[];
}
@@ -58,7 +60,7 @@ export async function readReviews(gh: Pick<GitHub, "repo" | "graphql">): Promise
issues(labels: ["review"], first: 50, after: $after, orderBy: { field: CREATED_AT, direction: ASC }) {
pageInfo { hasNextPage endCursor }
nodes {
number title state
number title state body
subIssues(first: 50) {
pageInfo { hasNextPage }
nodes {
@@ -82,6 +84,7 @@ export async function readReviews(gh: Pick<GitHub, "repo" | "graphql">): Promise
number: number;
title: string;
state: "OPEN" | "CLOSED";
body: string;
subIssues: {
pageInfo: { hasNextPage: boolean };
nodes: {
@@ -106,6 +109,7 @@ export async function readReviews(gh: Pick<GitHub, "repo" | "graphql">): Promise
number: issue.number,
title: issue.title,
open: issue.state === "OPEN",
body: issue.body,
problems: issue.subIssues.nodes.map((p) => ({
number: p.number,
title: p.title,