feat: draft of the --empty parameter
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/formatand./scripts/testlocally 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
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.
LGTM 💪🏻 , needs tests though
🍾 Nice to see that you approve the idea.
needs tests though
absolutely, I'll work on them this week (I hope)
@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
thanks @Lee-W