fix: changelog extraction matching version prefixes incorrectly#6
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes a bug in
extractChangelogForVersionwhere version0.1.1would incorrectly include content from0.1.10because the function checked if the line "contains" the version string rather than matching the exact header.Changes
## [headerextractChangelogForVersionfor testability--skip-changelogflag topre_release_check.darttest/tool/subfolder for better organizationTest plan
0.1.1doesn't match0.1.10dart tool/pre_release_check.dart --skip-changelogpassesMade with Cursor