commitizen icon indicating copy to clipboard operation
commitizen copied to clipboard

feat: draft of the --empty parameter

Open 12rambau opened this issue 2 years ago • 5 comments

superceed #696

Description

First draft of a new feature. The idea is to grant the user the capability to run cz bump without prior commits. The reasons are described in the associated issue.

here we add an --empty parameter to the bump method when this parameter is set and if no increment is find, a automatic "PATCH" is released.

I'll wait for your feedback before working on tests and documentation.

Checklist

  • [ ] Add test cases to all the changes you introduce
  • [ ] Run ./scripts/format and ./scripts/test locally to ensure this change passes linter check and test
  • [ ] Test the changes on the local machine manually
  • [ ] Update the documentation for the changes

Additional context

Fix #662

12rambau avatar Apr 24 '23 05:04 12rambau

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 97.54%. Comparing base (120d514) to head (c71773a). Report is 325 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #723      +/-   ##
==========================================
+ Coverage   97.33%   97.54%   +0.21%     
==========================================
  Files          42       55      +13     
  Lines        2104     2489     +385     
==========================================
+ Hits         2048     2428     +380     
- Misses         56       61       +5     
Flag Coverage Δ
unittests 97.54% <100.00%> (+0.21%) :arrow_up:

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

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Apr 24 '23 05:04 codecov[bot]

LGTM 💪🏻 , needs tests though

woile avatar Apr 24 '23 13:04 woile

🍾 Nice to see that you approve the idea.

needs tests though

absolutely, I'll work on them this week (I hope)

12rambau avatar Apr 24 '23 13:04 12rambau

@woile @noirbizarre, I picked this up and refactored it a bit. I changed the argument to --allow-no-commit. One weird thing that might happen is that one commit might have multiple versions. I'm not sure whether it would cause any issue

Lee-W avatar Apr 21 '24 09:04 Lee-W

thanks @Lee-W

12rambau avatar Apr 21 '24 17:04 12rambau