Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Add changelog argument options #294

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
merged 2 commits into from
Nov 4, 2020

Conversation

janw
Copy link
Contributor

@janw janw commented Nov 4, 2020

Description

As described in #291, this adds config options for the changelog arguments --incremental and --start-rev to commitizen.

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

  • With changelog_incremental = true in the config file, commitizen will only ever attempt incremental changelog updates.
  • With changelog_start_rev = <rev> in the config file, commitizen will always update the changelog starting from the given rev.

Steps to Test This Pull Request

changelog_incremental

  1. Add changelog_incremental = true to pyproject.toml/.cz.toml
  2. add e.g. a custom preamble to the changelog
  3. add changes and commit them as feat/fix
  4. run cz changelog
  5. have changelog updated and the preamble kept intact

changelog_start_rev

  1. add changes and commit them as feat/fix
  2. add changes and commit them as feat/fix and note rev
  3. Add changelog_start_rev = <rev> to pyproject.toml/.cz.toml where is the noted rev from the second commit
  4. run cz changelog and see the first commit not being added as an entry to changelog

Additional context

#291

@codecov
Copy link

codecov bot commented Nov 4, 2020

Codecov Report

Merging #294 into master will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #294   +/-   ##
=======================================
  Coverage   96.64%   96.64%           
=======================================
  Files          33       33           
  Lines         923      923           
=======================================
  Hits          892      892           
  Misses         31       31           
Flag Coverage Δ
unittests 96.64% <100.00%> (ø)

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/changelog.py 97.29% <100.00%> (ø)

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 14b6c38...9e9fdb2. Read the comment docs.

@woile
Copy link
Member

woile commented Nov 4, 2020

Nice, thanks :D

@woile woile merged commit 86efdcb 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