fix: add missing header when CHANGELOG_PENDING.md pre-exists but is empty

The repo already had an empty CHANGELOG_PENDING.md from 2026-03-30, so the
FileNotFoundError branch that adds the header/marker never fired -- the
first automated entry landed with no header, just leading blank lines.
Treat an existing-but-blank file the same as a missing one. Also fixes up
the header on the entry already drafted by the previous run. [skip ci]
This commit is contained in:
Rene Fichtmueller 2026-07-18 07:13:21 +00:00
parent c0df5ff557
commit d8e2897a79
2 changed files with 5 additions and 0 deletions

View File

@ -83,6 +83,8 @@ def main():
try:
with open("CHANGELOG_PENDING.md", "r") as f:
existing = f.read()
if not existing.strip():
existing = PENDING_HEADER # pre-existing but empty placeholder file
except FileNotFoundError:
existing = PENDING_HEADER

View File

@ -1,5 +1,8 @@
# Pending Changelog Entries
Drafted automatically from commit messages since the last processed push. Review, edit as needed, and fold into CHANGELOG.md -- then clear this file.
<!-- PENDING_ENTRIES -->
## Pending -- 2026-07-18
### Fixed