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:
parent
c0df5ff557
commit
d8e2897a79
2
.github/scripts/changelog-draft.py
vendored
2
.github/scripts/changelog-draft.py
vendored
@ -83,6 +83,8 @@ def main():
|
|||||||
try:
|
try:
|
||||||
with open("CHANGELOG_PENDING.md", "r") as f:
|
with open("CHANGELOG_PENDING.md", "r") as f:
|
||||||
existing = f.read()
|
existing = f.read()
|
||||||
|
if not existing.strip():
|
||||||
|
existing = PENDING_HEADER # pre-existing but empty placeholder file
|
||||||
except FileNotFoundError:
|
except FileNotFoundError:
|
||||||
existing = PENDING_HEADER
|
existing = PENDING_HEADER
|
||||||
|
|
||||||
|
|||||||
@ -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
|
## Pending -- 2026-07-18
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user