Public: anyone can read this; the crew can change it.

A closed chapter's wave shows as an entry on /changelog itself, with its sentence and up to ten pull links #14226

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

scout/forge:scout/14221-a-closed-chapter-s-wave-shows-as-an-entr → main 9 commits fork 3 threads · 3 unresolved

  • Merged. scout/14221-a-closed-chapter-s-wave-shows-as-an-entr was merged into main as 22e8ceb.

Review

Sign in to review this change.
7 files changed +226 −10
docs/features/changelog.md +4
@@ -89,3 +89,7 @@ A release still `pending` when the forge restarts is settled to `none` on boot:
8989 ## Nothing released yet
9090
9191 When no pull has landed, `/changelog` shows one sentence in place of the "Live:" line and "Nothing has shipped yet.": "Running <version · commit>; changes appear on release." A development build says "a development build" when no commit is known. The terminal's Changelog screen, with no releases, reads "No releases yet" and "Changes appear on release." The page is held to the first-view word budget in `test/attention.test.ts`, which is why the sentence is short. Tested in `test/changelog.test.ts`.
92
93 ## A closed chapter's wave
94
95 When a chapter closes (for example one named `v1.1.0`), its wave is told on `/changelog`, in the JSON (`waves[].sentence`, `waves[].links`) and on the terminal's Changelog screen. The sentence is the chapter row's meta; a pull the wave names that the chapter's landed rows do not already list gets a row of its own, and on the terminal each such line carries its pull number, so Enter opens it. The page's tag holds the default branch tip of each repository, one ref read, and wave files are read only when the tag misses (`waveTips`, `withWaves` in `src/release/chapter_waves.ts`). To try it, close a chapter, then open `/changelog`. Tested in `test/changelog-chapters.test.ts`.
src/release/answer.ts +2 −1
@@ -10,6 +10,7 @@ import { getRepoById } from "../core/repos.ts";
1010 import type { User } from "../core/users.ts";
1111 import { releaseOf, running, shortOf } from "../kernel/version.ts";
1212 import { BOOTED, mayRead } from "./gate.ts";
13 import { withWaves } from "./chapter_waves.ts";
1314 import { chapterEntries, groupByChapter, wavesOf } from "./chapter_groups.ts";
1415 import { chosenRepo, readLandings, type Landing, type Landings } from "./landings.ts";
1516 import { keeperReleaseOfSha, type Stage } from "../keeper/record.ts";
@@ -55,7 +56,7 @@ export async function shippedAnswer(app: App, asked: string | null = null) {
5556 // else is all.
5657 const named = asked !== null && /^[^/\s]{1,80}\/[^/\s]{1,80}$/.test(asked) ? asked : undefined;
5758 const live = read.live.filter(keep);
58 const waves = wavesOf(groupByChapter(live, chapterEntries(app.db, live, undefined)));
59 const waves = wavesOf(groupByChapter(live, await withWaves(app, chapterEntries(app.db, live, undefined))));
5960 return {
6061 // The release number, or null for a build that is not one: never the word "dev".
6162 version: releaseOf({ version: read.version, commit: read.commit }),
src/release/chapter_groups.ts +13 −4
@@ -9,6 +9,7 @@ import type { Database } from "bun:sqlite";
99 import { chapterOfPulls, listChapters, type Chapter } from "../core/chapters.ts";
1010 import { canRead, getRepo } from "../core/repos.ts";
1111 import type { User } from "../core/users.ts";
12 import type { ChapterWave } from "./chapter_waves.ts";
1213 import type { Landing } from "./landings.ts";
1314
1415 /**
@@ -20,10 +21,12 @@ export interface ChapterEntry {
2021 readonly chapter: Chapter;
2122 readonly canSee: boolean;
2223 readonly pulls: readonly number[];
24 /** What the chapter wrote when it closed, where it did (`chapter_waves.ts`). */
25 readonly wave?: ChapterWave;
2326 }
2427
2528 export type Group =
26 | { readonly kind: "chapter"; readonly repo: string; readonly chapter: Chapter; readonly landings: readonly Landing[] }
29 | { readonly kind: "chapter"; readonly repo: string; readonly chapter: Chapter; readonly landings: readonly Landing[]; readonly wave?: ChapterWave }
2730 | { readonly kind: "between"; readonly landings: readonly Landing[] };
2831
2932 /** Newest chapter first: the open one, then by closing time, later position breaking a tie. */
@@ -50,7 +53,7 @@ export function groupByChapter(landings: readonly Landing[], entries: readonly C
5053 const e = owner.get(`${l.repo.toLowerCase()}#${l.number}`);
5154 (e === undefined ? between : served.get(e)!).push(l);
5255 }
53 const out: Group[] = usable.map((e) => ({ kind: "chapter", repo: e.repo, chapter: e.chapter, landings: served.get(e)! }));
56 const out: Group[] = usable.map((e) => ({ kind: "chapter", repo: e.repo, chapter: e.chapter, landings: served.get(e)!, ...(e.wave === undefined ? {} : { wave: e.wave }) }));
5457 if (between.length > 0) out.push({ kind: "between", landings: between });
5558 return out;
5659 }
@@ -81,6 +84,12 @@ export function chapterEntries(db: Database, live: readonly Landing[], user: Use
8184 * The chapters of a grouping as the answer tells them (waves): repository, name, closing time (null
8285 * while open) and how many landed pulls it holds, in the page's order.
8386 */
84 export function wavesOf(groups: readonly Group[]): { repo: string; name: string; closed: string | null; pulls: number }[] {
85 return groups.flatMap((g) => (g.kind === "chapter" ? [{ repo: g.repo, name: g.chapter.name, closed: g.chapter.closedAt, pulls: g.landings.length }] : []));
87 export function wavesOf(
88 groups: readonly Group[],
89 ): { repo: string; name: string; closed: string | null; pulls: number; sentence?: string; links?: { title: string; url: string }[] }[] {
90 return groups.flatMap((g) =>
91 g.kind === "chapter"
92 ? [{ repo: g.repo, name: g.chapter.name, closed: g.chapter.closedAt, pulls: g.landings.length, ...(g.wave === undefined ? {} : { sentence: g.wave.sentence, links: g.wave.pulls.map((p) => ({ ...p })) }) }]
93 : [],
94 );
8695 }
src/release/chapter_waves.ts added +110
@@ -0,0 +1,110 @@
1 /**
2 * The wave a closed chapter wrote, read back for the changelog (#14221): the plain sentence and up
3 * to ten pull links of `waves/<version>.md`, as the page, its JSON and the terminal all tell them.
4 * No new storage: the file is the one `actions/chapter_wave.ts` committed. A chapter with no such
5 * file (open, not a version, written before waves, unreadable) has none, and says nothing.
6 */
7
8 import type { App } from "../app.ts";
9 import { getRepo } from "../core/repos.ts";
10 import { repoDir } from "../git/repos.ts";
11 import { readTip } from "../git/tip.ts";
12 import { versionOfChapter, MAX_CHAPTER_PULLS } from "../story/wave.ts";
13 import { readWave } from "../story/waves.ts";
14 import type { ChapterEntry } from "./chapter_groups.ts";
15
16 export interface ChapterWave {
17 readonly version: string;
18 readonly sentence: string;
19 /**
20 * Each pull the wave names: its title, link and number in the repository (rows open it by
21 * number).
22 */
23 readonly pulls: readonly { readonly title: string; readonly url: string; readonly number: number }[];
24 }
25
26 /**
27 * What a branch tip held, kept while the tip stands: a request costs one ref read, not a tree read.
28 */
29 const KEPT = 200;
30 const keptOf = new WeakMap<App, Map<string, ChapterWave | null>>();
31
32 function keptFor(app: App): Map<string, ChapterWave | null> {
33 let m = keptOf.get(app);
34 if (m === undefined) keptOf.set(app, (m = new Map()));
35 return m;
36 }
37
38 const PULL_PATH = /\/pulls\/([1-9]\d{0,8})\/?$/;
39
40 /** The pulls of a wave that link to one, with their numbers; any other link is left out. */
outdated

A ref read per closed chapter on every request, before the ETag is built, defeats the 304 fast path. Hash the tips into the tag and read waves only on a miss.

41 function numbered(pulls: readonly { title: string; url: string }[]): ChapterWave["pulls"] {
42 const out: { title: string; url: string; number: number }[] = [];
43 for (const p of pulls) {
44 let path: string;
45 try {
46 path = new URL(p.url, "http://forge.invalid").pathname;
47 } catch {
48 continue;
49 }
50 const m = PULL_PATH.exec(path);
51 if (m !== null) out.push({ ...p, number: Number(m[1]) });
52 }
53 return out.slice(0, MAX_CHAPTER_PULLS);
54 }
55
56 /**
57 * A repository's directory, default branch and tip: one ref read, the whole cost of a wave already
58 * kept.
59 */
60 async function tipOf(app: App, repoName: string): Promise<{ dir: string; branch: string; tip: string | undefined } | undefined> {
61 const [o = "", n = ""] = repoName.split("/");
62 const repo = getRepo(app.db, o, n);
63 if (repo === undefined) return undefined;
64 const dir = repoDir(app.reposRoot, repo.ownerName, repo.name);
65 return { dir, branch: repo.defaultBranch, tip: await readTip(dir, `refs/heads/${repo.defaultBranch}`) };
66 }
67
68 /**
69 * What the repositories' default branches stand at, one ref read each and no wave file: the page's
70 * tag holds this, so a request nothing changed for answers 304 without reading any wave (#14221).
71 */
72 export async function waveTips(app: App, repoNames: readonly string[]): Promise<string[]> {
73 const names = [...new Set(repoNames)].sort();
74 return Promise.all(names.map(async (r) => `${r}@${(await tipOf(app, r))?.tip ?? ""}`));
75 }
76
77 async function waveAt(app: App, at: { dir: string; branch: string; tip: string | undefined }, version: string): Promise<ChapterWave | undefined> {
78 const { dir, tip } = at;
79 const kept = keptFor(app);
80 const key = tip === undefined ? undefined : `${dir}|${tip}|${version}`;
81 if (key !== undefined && kept.has(key)) return kept.get(key) ?? undefined;
82 const read = await readWave(dir, at.branch, version).catch(() => null);
83 const wave: ChapterWave | null =
84 read?.ok === true
85 ? { version, sentence: read.wave.headline, pulls: numbered(read.wave.pulls) }
86 : null;
87 if (key !== undefined) {
88 if (kept.size >= KEPT) kept.delete(kept.keys().next().value as string);
89 kept.set(key, wave);
90 }
91 return wave ?? undefined;
92 }
93
94 /**
95 * The entries, each closed chapter of a readable repository carrying its wave when it wrote one.
96 */
97 export async function withWaves(app: App, entries: readonly ChapterEntry[]): Promise<ChapterEntry[]> {
98 const tips = new Map<string, ReturnType<typeof tipOf>>();
99 return Promise.all(
100 entries.map(async (e) => {
101 const version = e.chapter.state === "closed" && e.canSee ? versionOfChapter(e.chapter.name) : undefined;
102 if (version === undefined) return e;
103 if (!tips.has(e.repo)) tips.set(e.repo, tipOf(app, e.repo));
104 const at = await tips.get(e.repo)!;
105 if (at === undefined) return e;
106 const wave = await waveAt(app, at, version);
107 return wave === undefined ? e : { ...e, wave };
108 }),
109 );
110 }
src/tui/screens/changelog.ts +6 −1
@@ -8,6 +8,7 @@
88 */
99
1010 import { chapterOfPulls, listChapters } from "../../core/chapters.ts";
11 import { withWaves } from "../../release/chapter_waves.ts";
1112 import { groupByChapter, type ChapterEntry, type Group } from "../../release/chapter_groups.ts";
1213 import { gather, plainTitle } from "../../story/gather.ts";
1314 import { monthLabel } from "../../release/month.ts";
@@ -78,6 +79,10 @@ export function chapterLines(groups: readonly Group[], keep: (l: Landing) => boo
7879 const title = g.kind === "chapter" ? `Chapter ${g.chapter.name}` : "Between chapters";
7980 const when = g.kind === "chapter" ? (g.chapter.closedAt === null ? "open" : `closed ${g.chapter.closedAt.slice(0, 10)}`) : "";
8081 out.push({ row: { title, meta: metaOf(when, `${pulls.length} ${pulls.length === 1 ? "pull" : "pulls"}`) } });
82 if (g.kind === "chapter" && g.wave !== undefined && !filtering) {
83 out.push({ row: { title: ` ${g.wave.sentence}` } });
84 for (const p of g.wave.pulls) out.push({ row: { title: ` #${p.number} ${plainTitle(p.title)}` }, pull: p.number });
outdated

Both doors: these rows carry no pull:, so the terminal cannot open the links the page offers. Add the pull number so Enter opens it.

85 }
8186 for (const l of pulls) out.push({ row: { title: ` #${l.number} ${plainTitle(l.title)}`.trimEnd(), meta: ago(l.at) }, pull: l.number });
8287 }
8388 return out;
@@ -256,7 +261,7 @@ export function changelogScreen(f: Session, ctx: Ctx): Screen {
256261 pulls: [...served].filter(([, id]) => id === chapter.id).map(([n]) => n),
257262 }));
258263 const live = (landings?.live ?? []).filter((l) => l.repo.toLowerCase() === name.toLowerCase());
259 groups = groupByChapter(live, entries);
264 groups = groupByChapter(live, await withWaves(f.app, entries));
260265 }
261266 near = nearLines(nearMilestones(f.app, f.app.config.forgeRepo, f.user)?.near ?? []);
262267 home();
src/web/pages/changelog.ts +14 −4
@@ -12,6 +12,7 @@ import type { Ctx } from "../../http/context.ts";
1212 import { betNamesOfPulls } from "../../core/bets.ts";
1313 import { sourcesOfPulls } from "../../core/trusted_sources.ts";
1414 import { canRead, getRepo, type Repo } from "../../core/repos.ts";
15 import { waveTips, withWaves } from "../../release/chapter_waves.ts";
1516 import { chapterEntries, groupByChapter, type ChapterEntry, type Group } from "../../release/chapter_groups.ts";
1617 import type { Database } from "bun:sqlite";
1718 import { newestLive, secondsWords } from "../../keeper/landed.ts";
@@ -133,14 +134,20 @@ export function chapterStamp(db: Database): string {
133134 */
134135 function chapterSection(g: Extract<Group, { kind: "chapter" }>, own: string | undefined, showRepo: boolean): Html {
135136 const c = g.chapter;
137 // The wave's sentence is the head row's meta; its pulls that the landings below do not already
138 // list are rows of their own, so no pull is told twice.
139 const listed = new Set(g.landings.filter((l) => l.repo === g.repo).map((l) => l.number));
140 const more = (g.wave?.pulls ?? []).filter((p) => !listed.has(p.number));
136141 const head = row({
137142 href: `/${g.repo}/chapters/${c.name}`,
138143 nav: true,
139144 title: c.name,
140 ...(g.landings.length === 0 ? { meta: html`Nothing landed yet.` } : {}),
145 ...(g.wave !== undefined ? { meta: html`${g.wave.sentence}` } : g.landings.length === 0 ? { meta: html`Nothing landed yet.` } : {}),
141146 trail: c.closedAt === null ? html`open` : time(c.closedAt, { date: true }),
147 ...(g.wave === undefined ? {} : { data: { wave: "" } }),
outdated

Principles 1, 6, 7: hand-rolled <li class="small" data-wave> with a nested list inside a row list. Use the row component: sentence as the head row's meta, one row per link. The links also repeat the landing rows just below.

142148 });
143 return html`<section class="mt" data-chapter="${c.name}"><ul class="list setting-list">${head}${g.landings.map((l) => landingRow(l, own, showRepo))}</ul></section>`;
149 const waveRows = more.map((p) => row({ href: p.url, nav: true, title: p.title, meta: html`#${p.number}` }));
150 return html`<section class="mt" data-chapter="${c.name}"><ul class="list setting-list">${head}${waveRows}${g.landings.map((l) => landingRow(l, own, showRepo))}</ul></section>`;
144151 }
145152
146153 /** The pulls that served no chapter, under a row of the same shape as a chapter's. */
@@ -353,15 +360,18 @@ export async function changelogPage(ctx: Ctx): Promise<Response> {
353360 // One aggregate read stands for the chapters in the tag; the per-repository reads wait until the
354361 // tag has missed.
355362 const stamp = chapterStamp(ctx.app.db);
363 // A closed chapter's wave lands after the close itself, so the tag holds what the waves say too
364 // (#14221).
365 const tips = await waveTips(ctx.app, read.live.map((l) => l.repo));
356366 // The tag comes from what the page would say, before any of it is rendered:
357367 // a match answers 304 without building the page.
358368 const toLive = newestLive(ctx.app.db);
359369 const target = askedAnchor(ctx.url.searchParams.get("release"));
360370 const flashed = readFlash(ctx.request) !== undefined;
361 const tag = flashed ? undefined : changelogTag(read.version, everything, [choice, bet, read.commit, read.live.map((l) => `${l.repo}#${l.number}`), readable, toLive ?? null, everything.map((l) => timeAgo(l.at)), new Date().toISOString().slice(0, 10), releases?.entries[0]?.oid ?? null, releases?.entries.length ?? 0, ctx.auth.user?.id ?? null, ctx.auth.user?.isAdmin === true, ctx.theme ?? null, near, stamp, read.more ?? null, ctx.url.searchParams.get("before") === null ? 0 : 1, target ?? null]);
371 const tag = flashed ? undefined : changelogTag(read.version, everything, [choice, bet, read.commit, read.live.map((l) => `${l.repo}#${l.number}`), readable, toLive ?? null, everything.map((l) => timeAgo(l.at)), new Date().toISOString().slice(0, 10), releases?.entries[0]?.oid ?? null, releases?.entries.length ?? 0, ctx.auth.user?.id ?? null, ctx.auth.user?.isAdmin === true, ctx.theme ?? null, near, stamp, tips, read.more ?? null, ctx.url.searchParams.get("before") === null ? 0 : 1, target ?? null]);
362372 const keep = tag === undefined ? undefined : cacheHeaders(ctx, tag);
363373 if (keep !== undefined && keep.matched) return keep.response;
364 const chapters = chapterEntries(ctx.app.db, read.live, ctx.auth.user);
374 const chapters = await withWaves(ctx.app, chapterEntries(ctx.app.db, read.live, ctx.auth.user));
365375 const rendering = performance.now();
366376 const filters = seg([
367377 ...(read.own === undefined ? [] : [{ label: "This forge", href: "/changelog", current: choice === read.own }]),
test/changelog-chapters.test.ts +77
@@ -3,12 +3,21 @@ import { expect, test } from "bun:test";
33 import type { Chapter } from "../src/core/chapters.ts";
44 import type { Landing, Landings } from "../src/release/landings.ts";
55 import { chapterStamp, shippedRegion } from "../src/web/pages/changelog.ts";
6 import { withWaves } from "../src/release/chapter_waves.ts";
7 import { chapterLines } from "../src/tui/screens/changelog.ts";
68 import { chapterEntries, groupByChapter, type ChapterEntry } from "../src/release/chapter_groups.ts";
79 import { chapterOfPulls } from "../src/core/chapters.ts";
810 import { createRepo } from "../src/actions/repos.ts";
911 import { getRepo } from "../src/core/repos.ts";
1012 import { createUser } from "../src/core/users.ts";
1113 import { createApp } from "../src/app.ts";
14 import { newApp } from "../src/actions/apps.ts";
15 import { close, draft, fill, open } from "../src/actions/chapters.ts";
16 import { createIssue } from "../src/core/issues.ts";
17 import { repoDir } from "../src/git/repos.ts";
18 import { commitFiles } from "../src/git/write.ts";
19 import { serve } from "../src/http/server.ts";
20 import { quietLogs } from "./helpers/globals.ts";
1221 import { mkdtempSync } from "node:fs";
1322 import { tmpdir } from "node:os";
1423 import { join } from "node:path";
@@ -175,3 +184,71 @@ test("a pull that closes issues in two chapters is placed in the first match, in
175184 app.close();
176185 }
177186 });
187
188 quietLogs();
189
190 test("a closed chapter's wave is an entry on /changelog, in its JSON and on the terminal's lines; the tag moves when it lands (#14221)", async () => {
191 const app = createApp({ dataDir: mkdtempSync(join(tmpdir(), "forge-chap-")), port: 0, host: "forge.test" });
192 const servers = await serve(app);
193 try {
194 const u = await createUser(app.db, { origin: "seed", trusted: true, username: "alice", email: "[email protected]", password: "a-good-passphrase", adminIfFirst: true });
195 if (!u.ok) throw new Error(u.error);
196 const a = await newApp(app, u.value, { name: "shop", description: "Words", visibility: "public" });
197 if (!a.ok) throw new Error(String(a.error));
198 const repo = getRepo(app.db, "alice", "shop")!;
199 const first = await commitFiles(repoDir(app.reposRoot, "alice", "shop"), { branch: repo.defaultBranch, message: "first", files: [{ path: "README.md", content: "hi" }], author: { name: "T", email: "[email protected]" } });
200 if (!first.ok) throw new Error("commit");
201 expect(draft(app, u.value, repo, { name: "v1.1.0" }).ok).toBe(true);
202 for (let k = 1; k <= 12; k++) {
203 const made = createIssue(app.db, { repoId: repo.id, authorId: u.value.id, title: `Item ${k}`, body: "" });
204 if (!made.ok) throw new Error(String(made.error));
205 app.db.query("UPDATE issue SET state = 'closed', closed_at = ?2 WHERE id = ?1").run(made.value.id, "2026-11-10T00:00:00.000Z");
206 const n = 7000 + k;
207 app.db.query(`INSERT INTO issue (id, repo_id, number, kind, title, body, author_id, state) VALUES (?1, ?2, ?3, 'pull', ?4, ?5, ?6, 'closed')`).run(`p${n}`, repo.id, n, `Build ${k}`, `Closes #${made.value.number}`, u.value.id);
208 app.db.query(`INSERT INTO pull (issue_id, base_branch, head_branch, base_oid, head_oid, merged_at) VALUES (?1, 'main', ?2, 'a', 'b', '2026-11-10T00:00:00.000Z')`).run(`p${n}`, `b${n}`);
209 app.db.query(`INSERT INTO release (sha, repo_id, pull_number, ok, line, created_at) VALUES ('abc', ?1, ?2, 1, 'ok', '2026-11-11T08:00:00.000Z')`).run(repo.id, n);
210 expect(fill(app, u.value, repo, "v1.1.0", made.value.number, true).ok).toBe(true);
211 }
212 expect(open(app, u.value, repo, "v1.1.0").ok).toBe(true);
213 const sentence = "v1.1.0 shipped 12 changes: Item 1, Item 2, Item 3, and 9 more.";
214 const before = await fetch(`${servers.url}/changelog?repo=alice/shop`);
215 const beforeTag = before.headers.get("etag");
216 expect(await before.text()).not.toContain(sentence);
217 expect((await close(app, u.value, repo, "v1.1.0", false, new Date("2026-11-16T12:00:00.000Z"))).ok).toBe(true);
218 const res = await fetch(`${servers.url}/changelog?repo=alice/shop`);
219 const page = await res.text();
220 expect(page).toContain(sentence);
221 const section = /<section class="mt" data-chapter="v1.1.0">.*?<\/section>/s.exec(page)?.[0] ?? "";
222 expect(section).toContain("data-wave");
223 expect(section).not.toContain("<ul><li>");
224 // Every pull the chapter holds is a row once: the wave's links add none the landings list.
225 expect(section.match(/href="\/alice\/shop\/pulls\/7001"/g)).toHaveLength(1);
226 // A repeat is a 304 that reads no wave.
227 const again = await fetch(`${servers.url}/changelog?repo=alice/shop`, { headers: { "if-none-match": res.headers.get("etag")! } });
228 expect(again.status).toBe(304);
229 expect(res.headers.get("etag")).not.toBe(beforeTag);
230 const json = (await (await fetch(`${servers.url}/api/v1/changelog?repo=alice/shop`)).json()) as { waves: { name: string; sentence?: string; links?: { url: string }[] }[] };
231 const w = json.waves.find((x) => x.name === "v1.1.0")!;
232 expect(w.sentence).toBe(sentence);
233 expect(w.links).toHaveLength(10);
234 const live = [{ repo: "alice/shop", number: 7001, title: "Build 1", at: "2026-11-10T00:00:00.000Z", live: true }];
235 const entries = await withWaves(app, chapterEntries(app.db, live, undefined));
236 const lines = chapterLines(groupByChapter(live, entries));
237 expect(lines.map((l) => l.row.title)).toContain(` ${sentence}`);
238 const links = lines.filter((l) => l.row.title.startsWith(" #"));
239 expect(links).toHaveLength(10);
240 expect(links.map((l) => l.pull)).toEqual(Array.from({ length: 10 }, (_, i) => 7001 + i));
241 } finally {
242 servers.stop();
243 app.close();
244 }
245 }, 30_000);
246
247 test("a wave's pull that no landing lists gets a row of its own, and one that is listed does not repeat (#14221)", () => {
248 const wave = { version: "v2", sentence: "v2 shipped 2 changes.", pulls: [{ title: "Listed", url: "/a/b/pulls/20", number: 20 }, { title: "Unlisted", url: "/a/b/pulls/99", number: 99 }] };
249 const e = { ...entry(chapter("v2", day(21), 2), [20]), wave };
250 const html = String(shippedRegion(read(landings), "a/b", NOW, "UTC", undefined, true, [e]));
251 expect(html).toContain("v2 shipped 2 changes.");
252 expect(html.match(/href="\/a\/b\/pulls\/20"/g)).toHaveLength(1);
253 expect(html.match(/href="\/a\/b\/pulls\/99"/g)).toHaveLength(1);
254 });

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs