Skip to content

Add ability to create changelog on bump - #293

Merged
Lee-W merged 3 commits into
commitizen-tools:masterfrom
janw:add-ability-to-create-changelog-on-bump
Nov 4, 2020
Merged

Lee-W merged 3 commits into
commitizen-tools:masterfrom
janw:add-ability-to-create-changelog-on-bump

Conversation

@janw

@janw janw commented Nov 4, 2020

Copy link
Copy Markdown
Contributor

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.

@codecov

codecov Bot commented Nov 4, 2020 •

Copy link
Copy Markdown

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 commented Nov 4, 2020

Copy link
Copy Markdown
Contributor Author

@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

@Lee-W Lee-W left a comment

Copy link
Copy Markdown
Member

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