ci: seed changelog entry on regen version bump#51
Conversation
| raise SystemExit("CHANGELOG.md has no '## [Unreleased]' section to anchor the new entry") | ||
| insert_at = idx + len(marker) | ||
| entry = f"## [{version}] - {date}\n\n### Changed\n\n- {title}\n" | ||
| text = text[:insert_at] + "\n" + entry + "\n" + text[insert_at:].lstrip("\n") |
There was a problem hiding this comment.
super nit: the new section is inserted immediately after the ## [Unreleased] header, so any pre-existing entries under ## [Unreleased] would end up rendered below the new version header and get misattributed to it. Harmless today since [Unreleased] is kept empty between releases, but if someone ever adds a manual entry there, the next regen would orphan it. Anchoring the insert before the first ^## \[ version section instead would be robust to that. (not blocking)
|
Good catch — addressed in eadeb42. The insert now anchors before the first released |
Regeneration bumps the patch version but never added a CHANGELOG entry, so
check-release(which requires a## [x.y.z]section matching the bump) failed on every regen PR — e.g. #50 had to be fixed by hand. Adds a step that seeds a stub entry (the spec-change title under### Changed) after## [Unreleased]right after the version bump. Idempotent, and the PR author refines the wording before merge.