Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat: add --allow-no-commit option #723

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Lee-W merged 4 commits into commitizen-tools:master from 12rambau:empty
Feb 7, 2025
Merged

Conversation

Copy link
Contributor

@12rambau 12rambau commented Apr 24, 2023

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

swssl reacted with thumbs up emoji
Copy link

codecov bot commented Apr 24, 2023
edited
Loading

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.59%. Comparing base (120d514) to head (10740c9).
Report is 551 commits behind head on master.

Additional details and impacted files
@@ Coverage Diff @@
## master #723 +/- ##
==========================================
+ Coverage 97.33% 97.59% +0.25% 
==========================================
 Files 42 55 +13 
 Lines 2104 2617 +513 
==========================================
+ Hits 2048 2554 +506 
- Misses 56 63 +7 
Flag Coverage Δ
unittests 97.59% <100.00%> (+0.25%) ⬆️

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.

Copy link
Member

woile commented Apr 24, 2023

LGTM 💪🏻 , needs tests though

Copy link
Contributor Author

🍾 Nice to see that you approve the idea.

needs tests though

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

woile reacted with rocket emoji

@woile woile requested a review from Lee-W April 28, 2023 07:42
Copy link
Member

@Lee-W Lee-W left a comment

Choose a reason for hiding this comment

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

LGTM. I recently happen to work on a project need such feature lol 🎉

Copy link
Member

Lee-W commented Apr 21, 2024

@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

Copy link
Contributor Author

thanks @Lee-W

@Lee-W Lee-W changed the title (削除) feat: draft of the --empty parameter (削除ここまで) (追記) feat: add --allow-no-commit option (追記ここまで) Jan 30, 2025
Copy link
Member

Lee-W commented Jan 30, 2025

Hey @woile @noirbizarre , I just rebased it from the latest master branch. Would be nice if you could take a look. Thanks!

Copy link
Member

woile commented Jan 30, 2025

Should this be exposed as a config parameter as well? besides that it looks good

Copy link
Member

Lee-W commented Jan 30, 2025

Should this be exposed as a config parameter as well? besides that it looks good

Yep, could be. let me update it as well. Just notice the CI also failed 🤦‍♂️

Copy link
Member

Lee-W commented Jan 30, 2025

Should this be exposed as a config parameter as well? besides that it looks good

@woile After a second thought, I think we probably shouldn't add it. I feel this is somewhat like an exception, and if we're to do it, we probably need to introduce a better config/arugment handling to avoid #996

woile reacted with thumbs up emoji

Copy link
Member

woile commented Jan 30, 2025

And there's still an issue with vsc with no commits

Copy link
Member

Lee-W commented Jan 31, 2025

And there's still an issue with vsc with no commits

I'm afraid I don't quite get this one 🤔

Copy link
Member

I'll take a look tomorrow 👍🏽

Lee-W reacted with heart emoji

Copy link
Member

@noirbizarre noirbizarre left a comment

Choose a reason for hiding this comment

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

LGTM ! (before it reaches 2 years old, sorry for that)
This feature is needed. I think we can iterate on smaller pull request to add later settings or any other adjustments

Lee-W reacted with thumbs up emoji Lee-W reacted with heart emoji 12rambau reacted with rocket emoji
@Lee-W Lee-W merged commit 2c97d02 into commitizen-tools:master Feb 7, 2025
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers

@noirbizarre noirbizarre noirbizarre approved these changes

@Lee-W Lee-W Awaiting requested review from Lee-W Lee-W is a code owner

@woile woile Awaiting requested review from woile woile is a code owner

Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

create a dev bump straight after a normal bump

AltStyle によって変換されたページ (->オリジナル) /