Skip to content

feat(changelog): add support for single version and version range #400

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 4 commits into from
Mar 29, 2022

Conversation

woile
Copy link
Member

@woile woile commented Jul 8, 2021

Closes #399 #225

Description

Allows the creation of a changelog for the given version, supports:

cz changelog --dry-run 1.0.0..2.0.0
cz changelog --dry-run 1.0.0

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

Steps to Test This Pull Request

  1. Move to the branch of this PR
  2. Run the commands given above

TODO

  • Tests
  • Syntax approval: do you think this syntax would be okay?

Additional context

Closes #399 #225

@woile woile requested a review from Lee-W July 8, 2021 19:16
@codecov
Copy link

codecov bot commented Jul 8, 2021

Codecov Report

Merging #400 (4bb9131) into master (e6f1dc3) will increase coverage by 0.00%.
The diff coverage is 98.75%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #400   +/-   ##
=======================================
  Coverage   98.05%   98.06%           
=======================================
  Files          39       39           
  Lines        1441     1499   +58     
=======================================
+ Hits         1413     1470   +57     
- Misses         28       29    +1     
Flag Coverage Δ
unittests 98.06% <98.75%> (+<0.01%) ⬆️

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

Impacted Files Coverage Δ
commitizen/cli.py 97.61% <ø> (ø)
commitizen/commands/changelog.py 96.59% <95.45%> (-0.82%) ⬇️
commitizen/__version__.py 100.00% <100.00%> (ø)
commitizen/bump.py 100.00% <100.00%> (ø)
commitizen/changelog.py 97.25% <100.00%> (+0.77%) ⬆️
commitizen/commands/bump.py 95.19% <100.00%> (ø)
commitizen/config/toml_config.py 100.00% <100.00%> (ø)
commitizen/cz/__init__.py 100.00% <100.00%> (ø)
commitizen/exceptions.py 100.00% <100.00%> (ø)
commitizen/git.py 100.00% <100.00%> (ø)
... and 1 more

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 27b4c54...4bb9131. Read the comment docs.

@woile
Copy link
Member Author

woile commented Feb 13, 2022

Lots of progress, I just have to fix and add some tests for the ranges:

0.2.0..0.3.0
0.3.0..0.4.0

@woile woile force-pushed the feat/changelog-position-arg branch from dfe0c4e to f831e97 Compare February 13, 2022 13:39
@woile woile force-pushed the feat/changelog-position-arg branch from f831e97 to 4c833a1 Compare February 13, 2022 13:42
@woile
Copy link
Member Author

woile commented Feb 13, 2022

@Lee-W can u test this PR locally? the tests are passing on my machine, not sure why they are failing now 🤔

The PR is ready 🎉

@woile woile marked this pull request as ready for review February 13, 2022 14:44
@Lee-W
Copy link
Member

Lee-W commented Feb 14, 2022

I might need some more time to fully review it but I just found out the reason of these failing tests. The date of tmp_git_project is decided by the time we run the tests which cannot be easily pinned by freezegun. Not sure whether there's work around for this case. If not, we might need to use traditional assertion instead of pytest-regression in the tests that depends on date.

@woile
Copy link
Member Author

woile commented Feb 14, 2022

Thanks for the info, I understand it better now, I'm gonna check what can be done

@woile woile force-pushed the feat/changelog-position-arg branch from 4a0730a to 3084375 Compare February 25, 2022 12:06
@woile
Copy link
Member Author

woile commented Feb 25, 2022

@Lee-W could you help me with this one? No clue why it's failing and they are passing locally. I patched the gittag date to avoid the problem with git timestamp and it works locally

@woile woile force-pushed the feat/changelog-position-arg branch 2 times, most recently from 951d30e to 1e9d5d0 Compare February 28, 2022 12:24
@woile
Copy link
Member Author

woile commented Feb 28, 2022

@Lee-W can u take a look? I think is ready

@Lee-W
Copy link
Member

Lee-W commented Feb 28, 2022

I'm a bit busy these days. Will try to take a look ASAP. 🙏

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.

It's so much work 💪 Hope I can be as productive during next week's development sprint. I've left some comments and questions.

@woile woile force-pushed the feat/changelog-position-arg branch from 1e9d5d0 to 2020925 Compare March 4, 2022 09:35
@woile woile force-pushed the feat/changelog-position-arg branch from 2020925 to 4bb9131 Compare March 14, 2022 12:54
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.

Sorry for taking so long. Let's merge it!

@Lee-W Lee-W merged commit 0497d62 into master Mar 29, 2022
@Lee-W Lee-W deleted the feat/changelog-position-arg branch March 29, 2022 01:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

generate changelog for a single tag
2 participants