-
-
Notifications
You must be signed in to change notification settings - Fork 265
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
fix(get-next-bump): fix to permit usage of --get-next option even when update_changelog_on_bump is set to true #1301
base: master
Are you sure you want to change the base?
Conversation
…en update_changelog_on_bump is set to true
d563504
to
e5d6797
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1301 +/- ##
==========================================
+ Coverage 97.33% 97.55% +0.21%
==========================================
Files 42 55 +13
Lines 2104 2613 +509
==========================================
+ Hits 2048 2549 +501
- Misses 56 64 +8
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
# Setting dry_run to prevent any unwanted changes to the repo or files | ||
self.dry_run = True | ||
else: | ||
# If user specified changelog_to_stdout, they probably want the | ||
# changelog to be generated as well, this is the most intuitive solution |
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.
I'm not so sure about that. If a user wants to print something, they may want to review it first before making any changes.
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.
This comment and the associated self.changelog_flag = (self.changelog_flag or bool(self.changelog_to_stdout) or self.changelog_config)
is from the L210-L212 of the previous code. (with the inclusion of the new changelog_config
change)
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.
If a user wants to print something, they may want to review it first before making any changes.
And, from what I understand from the the rest of the bump
code, using changelog_to_stdout
flag essentially put the changelog generation in dry run. So it will not change any files (my MR doesn't seem to change that behavior I guess).
Description
With the configuration options
update_changelog_on_bump
set toTrue
, the commandcz bump --get-next
crashed, due to the mutual exclusive options--get-next
and--changelog
/--changelog-to-stdout
.Changing this behavior to still throw a conflict when using both CLI options, but let
--get-next
take the precedence overupdate_changelog_on_bump
configuration.Checklist
./scripts/format
and./scripts/test
locally to ensure this change passes linter check and testExpected behavior
Now the configuration options
update_changelog_on_bump
can be set to whatever you want when using thecz bump --get-next
command.Steps to Test This Pull Request
update_changelog_on_bump
flag set to true.cz bump --get-next
Additional context