Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat(#319): add optional change_type_order #323

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
Lee-W merged 5 commits into commitizen-tools:master from KyleKing:issues/319
Jan 1, 2021
Merged

feat(#319): add optional change_type_order #323

Lee-W merged 5 commits into commitizen-tools:master from KyleKing:issues/319
Jan 1, 2021

Conversation

Copy link
Contributor

@KyleKing KyleKing commented Dec 24, 2020
edited
Loading

Description

Implements proposed feature in #319. The default change type order is ["BREAKING CHANGE", "feat", "fix", "refactor", "perf"] (in descending order of importance) followed by any other change types in alphabetical order. In the configuration file, a user can override this setting to specify their own order and cover custom change types of interest.

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

The CHANGELOG should be ordered in the user-specified order rather than FIFO

Steps to Test This Pull Request

Run the standard pytest suite and see the two new test cases

Additional context

Fixes #319

Example use: KyleKing/calcipy@4a480a8

@KyleKing KyleKing marked this pull request as draft December 24, 2020 23:09
Copy link

codecov bot commented Dec 26, 2020
edited
Loading

Codecov Report

Merging #323 (0e3482a) into master (aa2959d) will increase coverage by 0.02%.
The diff coverage is 100.00%.

Impacted file tree graph

@@ Coverage Diff @@
## master #323 +/- ##
==========================================
+ Coverage 97.17% 97.20% +0.02% 
==========================================
 Files 35 35 
 Lines 991 1000 +9 
==========================================
+ Hits 963 972 +9 
 Misses 28 28 
Flag Coverage Δ
unittests 97.20% <100.00%> (+0.02%) ⬆️

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

Impacted Files Coverage Δ
commitizen/__version__.py 100.00% <100.00%> (ø)
commitizen/commands/changelog.py 97.40% <100.00%> (+0.10%) ⬆️
commitizen/cz/base.py 100.00% <100.00%> (ø)
commitizen/cz/customize/customize.py 94.11% <100.00%> (+0.50%) ⬆️
commitizen/defaults.py 100.00% <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 edc06c3...0e3482a. Read the comment docs.

@KyleKing KyleKing changed the title (削除) WIP: fix(#319): add optional change_type_order (削除ここまで) (追記) fix(#319): add optional change_type_order (追記ここまで) Dec 26, 2020
@KyleKing KyleKing marked this pull request as ready for review December 26, 2020 16:57
Copy link
Contributor Author

I think this is all done. I cleaned up the commit history so that the first commit is just a refactor to move the commit tree to a global variable for use by my new tests. The diff on the second commit are the actual changes: e855269

I've tested the changes in my personal project and all seems to work well even with custom change types: KyleKing/calcipy@4a480a8

Copy link
Member

woile commented Dec 29, 2020

Hi KyleKing, awesome work here! Minor correction, this is a new feature, so I'd like to ask you to rebase your PR using feat instead of fix, or if you want I can squash it and rename it, no problem.

@KyleKing KyleKing changed the title (削除) fix(#319): add optional change_type_order (削除ここまで) (追記) feat(#319): add optional change_type_order (追記ここまで) Dec 29, 2020
Copy link
Contributor Author

KyleKing commented Dec 29, 2020
edited
Loading

@woile, thanks! Good point 🤦 I amended the commit message

Copy link
Contributor Author

@KyleKing KyleKing left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I restored the white space changes and I think I addressed all of the comments. Thanks for the feedback!

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.

@KyleKing Thanks for your rapid update! There's only one minor exception improvement I'd like to have. I think we're almost ready to merge this one! 🎉

KyleKing reacted with thumbs up emoji
KyleKing added a commit to KyleKing/cz_legacy that referenced this pull request Dec 31, 2020
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.

@KyleKing Thanks for the latest update! Let's merge it back to master

@Lee-W Lee-W merged commit 34ba400 into commitizen-tools:master Jan 1, 2021
Lee-W pushed a commit that referenced this pull request Jan 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers

@Lee-W Lee-W Lee-W approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

[feature/changelog] Order Change Types Based on Bump Map Rules

AltStyle によって変換されたページ (->オリジナル) /