chore(release): cut v1.7.1 (#434)

Rolls [Unreleased] into [1.7.1] - 2026-09-06 and moves the compare links.
Keeps an empty [Unreleased] heading above the release, per Keep a Changelog,
and teaches the CHANGELOG structure guard that an absent [Unreleased]
section is nothing to check rather than an error.


Claude-Session: https://claude.ai/code/session_013fqqLgQSnwgWkv98twQhHi

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
Mads Lorentzen
2026-09-06 20:19:17 +02:00
committed by GitHub
co-authored by Claude Fable 5.1
parent e6f6f4e322
commit 1a116b3c64
2 changed files with 17 additions and 3 deletions
+13 -2
View File
@@ -24,8 +24,13 @@ CONFLICT_MARKERS = ("<<<<<<< ", "=======", ">>>>>>> ")
def unreleased_block(text: str) -> str:
"""The lines between `## [Unreleased]` and the next `## [` heading."""
start = text.index("## [Unreleased]")
"""The lines between `## [Unreleased]` and the next `## [` heading.
An absent heading (right after a release cut) yields an empty block:
nothing to check is not a defect."""
start = text.find("## [Unreleased]")
if start == -1:
return ""
end = text.find("\n## [", start + 1)
return text[start:] if end == -1 else text[start:end]
@@ -108,6 +113,12 @@ class UnreleasedProblemsTests(unittest.TestCase):
problems = unreleased_problems(text)
self.assertTrue(any("conflict marker" in p for p in problems), problems)
def test_missing_unreleased_section_is_not_a_defect(self):
# Right after a release cut there may be no [Unreleased] heading at all
# (the 1.7.0 cut removed it). Nothing to check is not a failure.
text = "# Changelog\n\n## [1.7.1] - 2026-09-06\n\n### Fixed\n\n- **A fixed thing** - described.\n"
self.assertEqual(unreleased_problems(text), [])
def test_released_sections_are_not_inspected(self):
# A duplicate heading in an old release is history, not a defect here.
text = CLEAN + "\n### Fixed\n\n- another old entry\n"