-
-
Notifications
You must be signed in to change notification settings - Fork 266
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
Shows deprecated warning before prompt questions #1146
base: master
Are you sure you want to change the base?
Conversation
Relates to #1135 |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1146 +/- ##
==========================================
+ Coverage 97.33% 97.54% +0.20%
==========================================
Files 42 55 +13
Lines 2104 2486 +382
==========================================
+ Hits 2048 2425 +377
- Misses 56 61 +5
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
It's a bad dev experience getting warning/failures after all questions answered.
The deprecated text was not shown when `cz commit --help`
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be possible for us to also document the --
behavior in help text 🤔
retry: bool = self.arguments.get("retry") | ||
no_retry: bool = self.arguments.get("no_retry") | ||
retry_after_failure: bool = self.config.settings.get("retry_after_failure") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we add a default value to these get
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmmm, we can add a explicit default value but .get
has a default value to None
if not specified.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, but None
is not a bool
, False
would be better 🙂
out.warn( | ||
"signoff mechanic is deprecated, please use `cz commit -- -s` instead.\n" | ||
) | ||
extra_args = self.arguments.get("extra_cli_args", "--") + " -s" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's use f-string here
Of course. I will add this too |
Description
Shows deprecated warning before prompt questions to dev, for an better experience.
Checklist
./scripts/format
and./scripts/test
locally to ensure this change passes linter check and testScreenshots
Shows deprecated warning before prompt questions
Shows deprecated warning on command help text
Dont' shows deprecated warning if uses
--signoff
option the right way