fix(release): stop rejecting the changelog entry pkgmgr itself produced
A heading in the message became a bold line, and markdown-lint reads a bold line on its own as a heading: MD036. Every structured entry therefore failed the check it had just been normalised for, and since the loop reopens the editor on failure there was no text that could end it. Headings now move below the "## [version]" line the entry is filed under. A "###" under a "##" is the hierarchy, not a competitor; only "#" and "##" would have collided, and those are the ones raised. The findings never reached the person either. They were printed and the editor took the terminal over in the same breath, so the reason was gone before it could be read. They are held on screen until Enter, and written into the editor buffer as ';' lines above the rejected text, where the fix is actually made; the buffer already drops those lines when it is read back. transform_changelog_message and lint_changelog_entry were each tested alone, which is how a transform that produces lint errors went unnoticed. A test now runs the output of the first through the second. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
59f470fb5e
commit
02384979bc
6 files changed
+117
-24
No files matched your search
@@ -334,9 +334,10 @@ class TestUpdateChangelog(unittest.TestCase):
|
||||
with open(path, encoding="utf-8") as f:
|
||||
content = f.read()
|
||||
|
||||
self.assertIn("**Summary**", content)
|
||||
self.assertIn("### Summary", content)
|
||||
self.assertIn("*foo*", content)
|
||||
self.assertNotIn("# Summary", content)
|
||||
self.assertNotIn("\n# Summary", content)
|
||||
self.assertNotIn("\n## Summary", content)
|
||||
self.assertNotIn("`foo`", content)
|
||||
|
||||
def test_update_changelog_preview_does_not_write(self) -> None:
|
||||
|
||||
Reference in new issue
Block a user