Skip to content

Thread tag_pattern through call and finalize chains#111

Closed
jeffdlange wants to merge 1 commit intomainfrom
fix/thread-tag-pattern-through-call-chain
Closed

Thread tag_pattern through call and finalize chains#111
jeffdlange wants to merge 1 commit intomainfrom
fix/thread-tag-pattern-through-call-chain

Conversation

@jeffdlange
Copy link

Summary

  • tag_pattern configured on Reissue::Task was only forwarded to the preview and bump tasks, but not to the core Reissue.call() and Reissue.finalize() methods
  • This caused GitFragmentHandler to always use its default pattern (/^v(\d+\.\d+\.\d+.*)$/), which fails for custom tag formats (e.g., v2026.02.A)
  • Without matching tags, the handler reads ALL git trailers from the entire repo history, causing the new version to inherit all previous changelog entries
  • Also forwards retain_changelogs to formatter.call() from the reissue rake task (was defaulting to false)

Changes

Threads tag_pattern: through:

  1. rake.rb — passes tag_pattern: and retain_changelogs: to formatter.call() and formatter.finalize()
  2. reissue.rb — accepts tag_pattern: in call() and finalize(), forwards to FragmentHandler.for()
  3. changelog_updater.rb — accepts tag_pattern: in call() and update(), forwards to FragmentHandler.for()

Test plan

  • All 129 existing tests pass
  • Verify with a project using custom tag_pattern that reissue:finalize and reissue correctly scope git trailers to commits since the last matching tag

The tag_pattern configured on the Rake task was only passed to the
preview and bump tasks, but not to the core call() and finalize()
methods. This meant the git fragment handler always used its default
pattern (/^v(\d+\.\d+\.\d+.*)$/), which fails to match custom tag
formats like v2026.02.A.

Without finding matching tags, the handler reads ALL git trailers
from the entire repository history instead of just since the last
release, causing the new version to inherit all previous entries.

Also passes retain_changelogs to formatter.call() from the reissue
rake task, which was previously defaulting to false.

Fixed: tag_pattern not threaded through to call and finalize
@jeffdlange jeffdlange requested a review from a team as a code owner February 24, 2026 17:47
@jeffdlange
Copy link
Author

Obsolete

@jeffdlange jeffdlange closed this Feb 24, 2026
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.

1 participant