From 8e8522a7731b632c5d32e039029f7deba6f03c6d Mon Sep 17 00:00:00 2001 From: Prad Nukala Date: Fri, 25 Sep 2026 14:05:52 -0400 Subject: [PATCH] feat(cli): add release name handling for topic releases --- apps/cli/release-topics.ts | 41 ++++++++++++++++++++++++++++---------- 1 file changed, 30 insertions(+), 11 deletions(-) diff --git a/apps/cli/release-topics.ts b/apps/cli/release-topics.ts index bd9da04..f0efb5f 100755 --- a/apps/cli/release-topics.ts +++ b/apps/cli/release-topics.ts @@ -111,15 +111,16 @@ finished.sort((a, b) => a.finishedAt.localeCompare(b.finishedAt) || a.topic.numb // ── existing releases ──────────────────────────────────────────── -/** Topic -> its release. The body is kept in sync with render() on every run. */ -const released = new Map(); +/** Topic -> its release. Name and body are kept in sync with the render on every run. */ +const released = new Map(); for await (const raw of gh.list(`/repos/${gh.repo}/releases`)) { if (!raw || typeof raw !== "object") continue; if (!("id" in raw) || typeof raw.id !== "number") continue; if (!("tag_name" in raw) || typeof raw.tag_name !== "string") continue; if (!("body" in raw) || typeof raw.body !== "string") continue; + const name = "name" in raw && typeof raw.name === "string" ? raw.name : ""; const m = raw.body.match(//); - if (m) released.set(Number(m[1]), { id: raw.id, tag: raw.tag_name, body: raw.body }); + if (m) released.set(Number(m[1]), { id: raw.id, tag: raw.tag_name, name, body: raw.body }); } // ── timever ────────────────────────────────────────────────────── @@ -158,6 +159,17 @@ const ET_DAY = new Intl.DateTimeFormat("en-US", { month: "short", day: "numeric", }); +/** + * The release name: the ET day the topic finished (`September 4, 2026`). The + * docs changelog titles each entry with it, so the timeline reads by day; the + * topic itself leads the body's summary sentence. + */ +const ET_NAME = new Intl.DateTimeFormat("en-US", { + timeZone: "America/New_York", + month: "long", + day: "numeric", + year: "numeric", +}); /** Topic body sections worth carrying into the changelog (skipped while still `TODO`). */ const NOTES = ["Trigger", "Invariant", "Trap"] as const; @@ -202,10 +214,11 @@ function render(f: Finished, tag: string, sha: string, files: Map