Skip to content

fix(changelog): use HEAD as fallback when version tag does not exist - #121

Merged
miguelramos merged 1 commit into
mainfrom
fix/BUMP-CHANGELOG
Jan 9, 2026
Merged

fix(changelog): use HEAD as fallback when version tag does not exist#121
miguelramos merged 1 commit into
mainfrom
fix/BUMP-CHANGELOG

Conversation

@miguelramos

Copy link
Copy Markdown
Member

When generating changelogs during bump operations, the code was trying to use the new version tag as the to_ref for collecting commits. However, this tag does not exist yet at changelog generation time (Step 10), since tags are only created later (Step 12).

This caused a ReferenceError when running:
workspace bump --execute --git-commit --git-tag

Changes:

  • Add reference_exists() helper method to check if a Git reference exists
  • Modify build_git_refs() to fallback to HEAD when the target version tag does not exist yet

This ensures changelog generation works correctly in the normal bump workflow where changelogs are generated before Git tags are created.

When generating changelogs during bump operations, the code was trying to
use the new version tag as the to_ref for collecting commits. However,
this tag does not exist yet at changelog generation time (Step 10),
since tags are only created later (Step 12).

This caused a ReferenceError when running:
workspace bump --execute --git-commit --git-tag

Changes:
- Add reference_exists() helper method to check if a Git reference exists
- Modify build_git_refs() to fallback to HEAD when the target version
  tag does not exist yet

This ensures changelog generation works correctly in the normal bump
workflow where changelogs are generated before Git tags are created.
@miguelramos miguelramos self-assigned this Jan 9, 2026
@miguelramos
miguelramos merged commit 99b198c into main Jan 9, 2026
10 checks passed
@miguelramos
miguelramos deleted the fix/BUMP-CHANGELOG branch January 9, 2026 15:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🐛 TYPE: Bug Something is broken

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant