| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## master #1849 +/- ##
=======================================
Coverage 98.25% 98.26%
=======================================
Files 61 61
Lines 2815 2829 +14
=======================================
+ Hits 2766 2780 +14
Misses 49 49 ☔ View full report in Codecov by Harness. |
Sorry, something went wrong.
There was a problem hiding this comment.
Thanks!
Sorry, something went wrong.
There was a problem hiding this comment.
Adds support for limiting/wrapping commit message body line length during cz commit, via a new --body-length-limit CLI option and a corresponding body_length_limit config/default setting.
Changes:
Copilot reviewed 10 out of 10 changed files in this pull request and generated 3 comments.
Show a summary per file| File | Description |
|---|---|
| commitizen/commands/commit.py | Adds body rewrapping logic (_rewrap_body) during interactive commit message creation. |
| commitizen/cli.py | Adds --body-length-limit argument to the commit subcommand. |
| commitizen/defaults.py | Introduces body_length_limit in Settings and DEFAULT_SETTINGS. |
| tests/test_conf.py | Updates expected default config dictionaries to include body_length_limit. |
| tests/commands/test_commit_command.py | Adds tests for body wrapping and config/CLI precedence. |
| tests/commands/test_common_command/test_command_shows_description_when_use_help_option_py_3_10_commit_.txt | Updates CLI help snapshot to include --body-length-limit. |
| tests/commands/test_common_command/test_command_shows_description_when_use_help_option_py_3_11_commit_.txt | Updates CLI help snapshot to include --body-length-limit. |
| tests/commands/test_common_command/test_command_shows_description_when_use_help_option_py_3_12_commit_.txt | Updates CLI help snapshot to include --body-length-limit. |
| tests/commands/test_common_command/test_command_shows_description_when_use_help_option_py_3_13_commit_.txt | Updates CLI help snapshot to include --body-length-limit. |
| tests/commands/test_common_command/test_command_shows_description_when_use_help_option_py_3_14_commit_.txt | Updates CLI help snapshot to include --body-length-limit. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Sorry, something went wrong.
|
There are conflicts. Turning this PR to draft |
Sorry, something went wrong.
|
Many thanks for this PR, exactly what I'm looking for 😊 Any help needed to move this over the finish line? |
Sorry, something went wrong.
|
Thanks for the reminder. I believe the maintainers barely have bandwidth to review PRs. I'll take a quick look. |
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM.
Sorry, something went wrong.
|
Could you rebase? 🙏🏻 |
Sorry, something went wrong.
…limit in commit command
…d use tuple argument in pytest.mark.parametrize
The test was previously passing even if the code accidentally skipped the argument setting, which was incorrect. I realized I was always overriding the configuration in the test. Now, I pass the argument setting during mocking, and it behaves as expected.
| Back | FazBrowse Home | New Git URL |
Description
I added a tag (—body-length-limit) for command commit. This tag utilizes Python’s built-in library, textwrap, to rewrap the body. It also respects the user’s |(\n) signal. This tag will affect the footer as well.
The flow is as follows:
Checklist
Was generative AI tooling used to co-author this PR?
Generated-by: [Gemini] following the guidelines
Code Changes
Documentation Changes
Expected Behavior
Steps to Test This Pull Request
Additional Context
close #1597