Skip to content

Forward tag_pattern through call and finalize paths#110

Merged
saturnflyer merged 1 commit intomainfrom
fix/tag-pattern-passthrough
Feb 24, 2026
Merged

Forward tag_pattern through call and finalize paths#110
saturnflyer merged 1 commit intomainfrom
fix/tag-pattern-passthrough

Conversation

@saturnflyer
Copy link
Member

Summary

  • Thread tag_pattern: through Reissue.call, Reissue.finalize, ChangelogUpdater#call, and ChangelogUpdater#update so it reaches FragmentHandler.for in every code path
  • The reissue (bump) and reissue:finalize rake tasks now forward tag_pattern: to the formatter
  • Previously, tag_pattern was only forwarded in the preview and bump tasks, causing the git fragment handler to fall back to the default semver pattern in the main release workflow

Root cause: For projects using non-semver tags (e.g. v2026.02.A), the default pattern (/^v(\d+\.\d+\.\d+.*)$/) matched zero tags. This caused the handler to scan all commits in history and carry every historical trailer into the new version entry instead of starting clean.

Test plan

  • Added tag_pattern forwarding tests to test_changelog_updater.rb (update and call)
  • Added tag_pattern forwarding tests to test_reissue.rb (Reissue.call and Reissue.finalize)
  • All 133 existing tests pass with no regressions

The tag_pattern configured on Reissue::Task was only forwarded to the
git fragment handler in the preview and bump tasks. The main reissue
(version bump) and reissue:finalize tasks did not pass it through
Reissue.call, Reissue.finalize, or ChangelogUpdater, so the handler
always fell back to the default pattern (/^v(\d+\.\d+\.\d+.*)$/).

For projects using non-semver tag formats (e.g. v2026.02.A), this
caused the handler to match zero tags, fall back to scanning all
commits, and carry every historical trailer into the new version
entry instead of starting clean.

Thread tag_pattern: nil through Reissue.call, Reissue.finalize,
ChangelogUpdater#call, and ChangelogUpdater#update so it reaches
FragmentHandler.for in every code path.

Fixed: Forward tag_pattern to git fragment handler in call and finalize
@saturnflyer saturnflyer requested a review from a team as a code owner February 24, 2026 17:44
@saturnflyer saturnflyer merged commit 4696002 into main Feb 24, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants