Skip to content

Conversation

@MattBelle
Copy link

... line

This should enable us to correctly parse squashed commits made on an SCM server residing on a Windows OS.

Description

Checklist

Code Changes

  • Add test cases to all the changes you introduce
  • Run uv run poe all locally to ensure this change passes linter check and tests
  • Manually test the changes:
    • Verify the feature/bug fix works as expected in real-world scenarios
    • Test edge cases and error conditions
    • Ensure backward compatibility is maintained
    • Document any manual testing steps performed
  • Update the documentation for the changes

Documentation Changes

  • Run uv run poe doc locally to ensure the documentation pages renders correctly
  • Check and fix any broken links (internal or external) in the documentation

When running uv run poe 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

Commit bodies that use carriage returns for line breaks will now be successfully split when getting processed. In particular this enables commitizen to process squash commits made on an SCM server that is hosted by a Windows OS.

Steps to Test This Pull Request

  1. Make a dummy squash commit with carriage returns (\r\n):
ci: example ci change

fix: example fix change

feat: example feat change

additional context for example feat

test: example test change
  1. Run cz changelog --dry-run and verify that only the feat and fix entries are included
  2. Amend the previously made commit to use standard line feeds (\n)
  3. Run cz changelog --dry-run and verify that only the feat and fix entries are included

Additional Context

…line

This should enable us to correctly parse squashed commits made on an SCM server residing on a Windows OS.
@codecov
Copy link

codecov bot commented Jan 6, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.88%. Comparing base (d1f8bf0) to head (df198a8).
⚠️ Report is 2 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1780   +/-   ##
=======================================
  Coverage   97.88%   97.88%           
=======================================
  Files          60       60           
  Lines        2606     2606           
=======================================
  Hits         2551     2551           
  Misses         55       55           

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

Copy link
Collaborator

@bearomorphism bearomorphism left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall good, but I noticed a small inconsistency between the test and the implementation

Copy link
Collaborator

@bearomorphism bearomorphism left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!
@woile @Lee-W @noirbizarre could you also take a look?

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.

2 participants