ktg-plugin-marketplace/scripts
Kjell Tore Guttormsen f9a99056fe
fix(release): release notes come from the CHANGELOG, not the tag message
Same-day correction to ee2259f. That commit followed the order literally --
"use the tag's own message" -- and the result was an llm-security v8.0.0
release page reading "llm-security v8.0.0" and nothing else.

The defect is structural, not a typo: --create-tag mints -m "<name>
v<version>", so the tag message is mechanical EXACTLY where this helper made
the tag. The tag message is a good source only for tags written by hand.

The right source was already proven on the instance: llm-security v7.8.3's
release body is byte-for-byte its CHANGELOG `## [7.8.3]` section. So the
CHANGELOG is the org's established source, not a new invention -- and all 10
backfilled repos ship one (measured, 10/10).

- extractChangelogSection / releaseBodyFrom: pure, tested. Priority is
  CHANGELOG section -> tag message -> empty, and the source is REPORTED so a
  run says where the text came from rather than implying it wrote it.
- Three heading dialects are live and all three are covered: `## [6.0.0] -
  date`, `## [0.2.0] -- date` (em-dash), `## v1.0 (date)`, and voyage's
  `## v5.10.1 -- date -- trailing prose`. The version token matches exactly,
  so 0.1.0-pre is not 0.1.0 and 1.1.0 is not 1.10.0. An empty section (the
  standing `## [Unreleased]`) returns null so the caller falls through
  instead of publishing a blank body.
- backfill gains --repair for the backlog the first cut created. It PATCHes
  a PUBLISHED page, so the bar is strictly more informative, never merely
  different: no CHANGELOG section means no update, and a hand-written body at
  least as long as the section is left alone. Measured: that rule is what
  protects portfolio-optimiser v1.1.0 (4750 hand-written chars vs 3704).

Dry-run over the org: 14 release objects would gain real notes, e.g.
llm-security v8.0.0 19 chars -> 10530, config-audit v6.0.0 19 -> 27309.

18 new tests, written red first. Suite 211/211; check-versions 12/12 OK.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-18 02:41:18 +02:00
..
backfill-forgejo-releases.mjs fix(release): release notes come from the CHANGELOG, not the tag message 2026-09-18 02:41:18 +02:00
backfill-forgejo-releases.test.mjs fix(release): release notes come from the CHANGELOG, not the tag message 2026-09-18 02:41:18 +02:00
build-rollup-register.mjs fix(rollup): discover git worktrees - .git tested for existence, not directory-ness 2026-07-31 15:48:41 +02:00
build-rollup-register.test.mjs fix(rollup): discover git worktrees - .git tested for existence, not directory-ness 2026-07-31 15:48:41 +02:00
check-nav-golden.mjs test(okf): consume nav-golden fixtures + thin STEG 0 corpus gate 2026-07-24 20:35:44 +02:00
check-nav-golden.test.mjs test(okf): consume nav-golden fixtures + thin STEG 0 corpus gate 2026-07-24 20:35:44 +02:00
check-okf-parity.mjs feat(okf): enforce §3 okf_version shape, bump convention 0.1 -> 0.2 2026-07-25 20:32:30 +02:00
check-okf-parity.test.mjs feat(okf): enforce §3 okf_version shape, bump convention 0.1 -> 0.2 2026-07-25 20:32:30 +02:00
check-versions.mjs fix(catalog): bryt stat-linje-vranglåsen mellom de to pre-flightene 2026-09-18 01:05:39 +02:00
check-versions.test.mjs fix(catalog): release gate can no longer be green without measuring anything 2026-08-26 11:22:09 +02:00
okf-check.mjs docs(okf-check): body-text emitters are now ZERO — okr migrated too 2026-08-02 21:22:05 +02:00
okf-check.test.mjs fix(okf-check): required and recommended fields are read at top level only 2026-08-01 19:57:29 +02:00
okf-frontmatter.mjs test(catalog): flip red-nested-key -> green-nested-key (okr's checker converged) 2026-08-09 20:49:32 +02:00
release-plugin.mjs fix(release): release notes come from the CHANGELOG, not the tag message 2026-09-18 02:41:18 +02:00
release-plugin.test.mjs fix(release): release notes come from the CHANGELOG, not the tag message 2026-09-18 02:41:18 +02:00