Skip to content

Add ability to create changelog on bump #293

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

Conversation

janw
Copy link
Contributor

@janw janw commented Nov 4, 2020

Description

As described in #290, this adds the ability to set update_changelog_on_bump = true in the config file, and Commitizen will automatically update the changelog when running cz bump, even if the --changelog flag is not added.

Checklist

  • Add test cases to all the changes you introduce
  • Run ./script/format and ./script/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

Expected behavior

When setting update_changelog_on_bump = true cz bump will always update the changelog. When running cz bump --no-changelog that setting is overridden and the changelog is not updated.

Steps to Test This Pull Request

  1. add update_changelog_on_bump = true to pyproject.toml/.cz.toml
  2. add changes and commit them as feat/fix
  3. run cz bump
  4. have changelog updated and version bumped

Additional context

#290


Let me know if you want any changes to be done to wording or implementation.

@janw janw force-pushed the add-ability-to-create-changelog-on-bump branch from 223fe80 to 566b028 Compare November 4, 2020 10:49
@codecov
Copy link

codecov bot commented Nov 4, 2020

Codecov Report

Merging #293 into master will increase coverage by 0.32%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #293      +/-   ##
==========================================
+ Coverage   96.64%   96.96%   +0.32%     
==========================================
  Files          33       33              
  Lines         923      923              
==========================================
+ Hits          892      895       +3     
+ Misses         31       28       -3     
Flag Coverage Δ
unittests 96.96% <100.00%> (+0.32%) ⬆️

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

Impacted Files Coverage Δ
commitizen/defaults.py 100.00% <ø> (ø)
commitizen/__version__.py 100.00% <100.00%> (ø)
commitizen/commands/bump.py 94.25% <100.00%> (+3.44%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1ca22f4...33f9ccb. Read the comment docs.

@janw janw force-pushed the add-ability-to-create-changelog-on-bump branch from 566b028 to ba6e077 Compare November 4, 2020 13:10
@janw janw force-pushed the add-ability-to-create-changelog-on-bump branch from ba6e077 to 33f9ccb Compare November 4, 2020 13:13
@janw
Copy link
Contributor Author

janw commented Nov 4, 2020

@Lee-W I updated the PR to remove the --no-changelog flag. Let me know if there is anything else you'd want changed!

@Lee-W Lee-W self-requested a review November 4, 2020 14:45
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. Let's merge it!

@Lee-W Lee-W merged commit 9501fea into commitizen-tools:master Nov 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants