fix: compare changelog against working directory instead of HEAD#8
Merged
Conversation
| <!-- CONTEXT_LEDGER_MARKER --> | ||
|
|
||
|
|
||
| <!-- AI_APPEND_HERE --> |
Contributor
There was a problem hiding this comment.
Suggested change
| <!-- AI_APPEND_HERE --> | |
| ## [1.0.19] - August 2025 | |
| Improves changelog comparison logic to ensure more accurate and reliable changelog updates by comparing against the working directory state instead of HEAD. | |
| ### Changed | |
| - Updated changelog comparison logic to use working directory instead of HEAD reference | |
| ### Technical Details | |
| - Optimized git diff comparison mechanism for more reliable changelog updates |
Contributor
|
🏷️ Workflow: Production Version - This changelog was generated using |
Contributor
|
🧪 Workflow: Local Version - This changelog was generated using the PR's local code ( |
The previous comparison logic was flawed because it compared the changelog between origin/main and HEAD (last commit), ignoring uncommitted changes made by the generate-changelog.js script. This fix: - Extracts content from base branch using git show - Compares against actual file content in working directory - Shows proper diff between base and current state This ensures PR suggestions are created when changelog is actually modified.
c16eb77 to
7d74130
Compare
🤖 Automated by Claude AI [skip ci]
Contributor
|
🏷️ Workflow: Production Version - This changelog was generated using |
Contributor
|
🧪 Workflow: Local Version - This changelog was generated using the PR's local code ( |
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Contributor
|
🧪 Workflow: Local Version - This changelog was generated using the PR's local code ( |
Contributor
|
🏷️ Workflow: Production Version - This changelog was generated using |
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.
The previous comparison logic was flawed because it compared the changelog between origin/main and HEAD (last commit), ignoring uncommitted changes made by the generate-changelog.js script.
This fix:
This ensures PR suggestions are created when changelog is actually modified.
Description
Brief description of the changes in this PR.
Type of Change
Testing
Test Details:
Describe how you tested the changes.
Checklist
Breaking Changes
If this is a breaking change, please describe the impact and migration path for existing users.
Additional Notes
Any additional information that would be helpful for reviewers.