Skip to content

Conversation

@zimmermannJakob
Copy link

@zimmermannJakob zimmermannJakob commented Dec 7, 2025

Description

This PR solves issue #1694. This PR is still in draft, as I want to check whether the changes make sense conceptually and manual tests are still pending.

Checklist

Code Changes

  • Add test cases to all the changes you introduce
  • Run poetry all locally to ensure this change passes linter check and tests (Some error out on mac. I will investigate if they fail in ci)
  • Manually test the changes:
    • Verify the feature/bug fix works as expected in real-world scenarios
    • Test edge cases and error conditions (I thought about breaking changes and starting an empty changelog with prereleases.)
    • Ensure backward compatibility is maintained
    • Document any manual testing steps performed
      - [ ] Update the documentation for the changes (I do not think this applies. It works now as documented.)

### Documentation Changes

- [ ] Run poetry doc locally to ensure the documentation pages renders correctly
- [ ] Check and fix any broken links (internal or external) in the documentation

When running poetry doc, any broken internal documentation links will be reported in the console output like this:

INFO    -  Doc file 'config.md' contains a link 'commands/bump.md#-post_bump_hooks', but the doc 'commands/bump.md' does not contain an anchor '#-post_bump_hooks'.

Expected Behavior

See issue #1694.

Steps to Test This Pull Request

  1. build the changes on the branch. poetry build.
  2. Take the resulting .wheel file from dist/
  3. Install the file in a separate python environment:
  • python3 -m venv .venv && source .venv/bin/activate
  • verify env: which pip
  • pip install commitizen-4.10.0-py3-none-any.whl
  1. Go through the steps in the issue description and try reproducing the bug.

Additional Context

Known issue: When the changelog only contains pre-releases, the old behavior can still be observed. (Fixed)

@codecov
Copy link

codecov bot commented Dec 9, 2025

Codecov Report

❌ Patch coverage is 97.36842% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 98.66%. Comparing base (120d514) to head (73aa8a3).
⚠️ Report is 860 commits behind head on master.

Files with missing lines Patch % Lines
commitizen/changelog_formats/base.py 94.11% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1700      +/-   ##
==========================================
+ Coverage   97.33%   98.66%   +1.32%     
==========================================
  Files          42       60      +18     
  Lines        2104     2691     +587     
==========================================
+ Hits         2048     2655     +607     
+ Misses         56       36      -20     
Flag Coverage Δ
unittests 98.66% <97.36%> (+1.32%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant