Skip to content

fix: changelog extraction matching version prefixes incorrectly#6

Merged
robert-northmind merged 1 commit into
mainfrom
codex/ci-bug-fix
Feb 5, 2026
Merged

fix: changelog extraction matching version prefixes incorrectly#6
robert-northmind merged 1 commit into
mainfrom
codex/ci-bug-fix

Conversation

@robert-northmind

Copy link
Copy Markdown
Owner

Summary

Fixes a bug in extractChangelogForVersion where version 0.1.1 would incorrectly include content from 0.1.10 because the function checked if the line "contains" the version string rather than matching the exact header.

Changes

  • Fix version header matching to stop at the next ## [ header
  • Extract pure function extractChangelogForVersion for testability
  • Add regression test for version prefix bug
  • Add --skip-changelog flag to pre_release_check.dart
  • Move tool tests to test/tool/ subfolder for better organization

Test plan

  • Added regression test that verifies 0.1.1 doesn't match 0.1.10
  • All existing tests pass
  • dart tool/pre_release_check.dart --skip-changelog passes

Made with Cursor

The extractChangelogForVersion function would match version 0.1.1 with
0.1.10's content because it checked if the line "contains" the version
string rather than matching the exact header.

Changes:
- Fix version header matching to stop at the next ## [ header
- Extract pure function extractChangelogForVersion for testability
- Add regression test for version prefix bug
- Add --skip-changelog flag to pre_release_check.dart
- Move tool tests to test/tool/ subfolder for better organization

Co-authored-by: Cursor <cursoragent@cursor.com>
@robert-northmind robert-northmind added bug Something isn't working skip-changelog Skips the "require changelog" check labels Feb 5, 2026
@robert-northmind
robert-northmind merged commit d81f380 into main Feb 5, 2026
8 checks passed
@robert-northmind
robert-northmind deleted the codex/ci-bug-fix branch February 5, 2026 11:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working skip-changelog Skips the "require changelog" check

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant