Skip to content

fix: only update changelogs when version is different#21

Merged
luxass merged 2 commits intomainfrom
fix-incorrect-changelog-updates
May 3, 2026
Merged

fix: only update changelogs when version is different#21
luxass merged 2 commits intomainfrom
fix-incorrect-changelog-updates

Conversation

@luxass
Copy link
Copy Markdown
Member

@luxass luxass commented May 3, 2026

Summary by CodeRabbit

  • Bug Fixes

    • Prevent unnecessary changelog file rewrites when version numbers remain unchanged, reducing unnecessary file operations
    • Fixed generation of self-referencing comparison URLs in changelog entries when versions are identical
  • Tests

    • Added test coverage for scenarios where version numbers remain unchanged between releases

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 3, 2026

Warning

Rate limit exceeded

@luxass has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 55 minutes and 46 seconds before requesting another review.

To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: d6563a13-bea1-49c1-a7b3-dee01e2b279f

📥 Commits

Reviewing files that changed from the base of the PR and between 785869e and de68137.

📒 Files selected for processing (1)
  • src/core/changelog.ts
📝 Walkthrough

Walkthrough

The pull request prevents redundant changelog generation when a package version remains unchanged. Early-exit logic is added to both the core changelog update function and the workflow task builder, with corresponding test coverage verifying that changelog files are not rewritten when versions match.

Changes

Version Equality Changelog Skip

Layer / File(s) Summary
Core Logic
src/core/changelog.ts
generateChangelogEntry skips compareUrl generation when previousVersion equals version; updateChangelog returns early with verbose log when versions match.
Workflow Integration
src/workflows/prepare.ts
Changelog task builder skips commit fetching and updateChangelog call when package currentVersion equals newVersion.
Test Coverage
test/core/changelog.test.ts
New test case verifies CHANGELOG.md is not rewritten when version and previousVersion are identical, even with new commits available.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 A changelog unchanged, stays still as can be,
No writes, no compares, just quiet and free.
When versions don't budge, we skip the whole show—
Less friction, less noise, and whoosh—off we go! 🌱

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: adding logic to skip changelog updates when version hasn't changed, which is the core fix across all modified files.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix-incorrect-changelog-updates

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
Review rate limit: 0/1 reviews remaining, refill in 55 minutes and 46 seconds.

Comment @coderabbitai help to get the list of available commands and usage tips.

@luxass luxass merged commit 3c59f5b into main May 3, 2026
4 checks passed
@luxass luxass deleted the fix-incorrect-changelog-updates branch May 3, 2026 04:23
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