-
Notifications
You must be signed in to change notification settings - Fork 33
Fix ambiguous argument error when generating changelog #86
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@copilot continue |
The fix has been completed and tested. All tests pass (2/2) and the issue is resolved. Changes made (commit 0917fe2):
Testing: The PR is ready for review and merge. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
Fixes the fatal error that occurs when running
conventional-changelog
on a repository with no tags.Problem
When no tags exist in the repository,
Repository::getLastTag()
returns'0.0.0'
as a default value. This value is then used in git log commands likegit log --pretty=format:'...' 0.0.0...HEAD
, which fails with:Solution
Modified
src/Changelog.php
to detect when version is'0.0.0'
(indicating no tags were found) and replace it with the first commit hash when building git revision ranges. Since the first commit hash is a valid git reference, git commands succeed.Changes Made
Testing
--first-release
flag - works correctly--history
flag - works correctlyThe changes are minimal and surgical (9 insertions, 3 deletions), affecting only the specific case where no tags exist while maintaining all existing functionality.
Fixes #71
Original prompt
Fixes #71
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.