Context
Part of epic #12207. The portal needs per-type tree-index data for PRs/Discussions; the per-issue markdown is already synced under resources/content/{pulls,discussions}/ (+ archives). buildScripts/docs/index/tickets.mjs is the canonical pattern.
The Fix
Two sibling generators buildScripts/docs/index/pulls.mjs + discussions.mjs — near-copies of tickets.mjs (reject a generalized generator; sibling-duplication is the established repo pattern, the divergence surface is the whole non-boilerplate logic). Confirmed corrections from the corpus:
leaf.id = String(frontmatter.number) — pulls/discussions have no id key.
- pulls group Merged / Open / Closed (corpus ~3006 / 2 / 128 — a Merged/Open binary would drop the 128 closed-unmerged dependabot PRs).
- discussions group by
category (Ideas / General / Q&A).
- derive the group from frontmatter for active AND archive files (ignore the version-dir); drop the label filter (no labels).
- emit the chunked shape from the start (root group-index + per-chunk leaf files), so the new views are lazy-by-construction.
Wire into both buildScripts/release/prepare.mjs and .github/workflows/data-sync-pipeline.yml (publish.mjs re-runs tickets.mjs only).
Acceptance Criteria
Related
Epic #12207. Realizes #10056's data prerequisite. Shares the emitted chunked shape with the perf emitter-refactor (Track B) — decide that shape once.
Context
Part of epic #12207. The portal needs per-type tree-index data for PRs/Discussions; the per-issue markdown is already synced under
resources/content/{pulls,discussions}/(+ archives).buildScripts/docs/index/tickets.mjsis the canonical pattern.The Fix
Two sibling generators
buildScripts/docs/index/pulls.mjs+discussions.mjs— near-copies oftickets.mjs(reject a generalized generator; sibling-duplication is the established repo pattern, the divergence surface is the whole non-boilerplate logic). Confirmed corrections from the corpus:leaf.id = String(frontmatter.number)— pulls/discussions have noidkey.category(Ideas / General / Q&A).Wire into both
buildScripts/release/prepare.mjsand.github/workflows/data-sync-pipeline.yml(publish.mjs re-runs tickets.mjs only).Acceptance Criteria
pulls.json+discussions.jsongenerated in the chunked shape and wired into both production sites.Related
Epic #12207. Realizes #10056's data prerequisite. Shares the emitted chunked shape with the perf emitter-refactor (Track B) — decide that shape once.