Skip to content

Feat/addional config ch - #442

Merged
Lee-W merged 5 commits into
commitizen-tools:masterfrom
TheNomet:feat/addional_config_ch
Mar 29, 2022
Merged

Lee-W merged 5 commits into
commitizen-tools:masterfrom
TheNomet:feat/addional_config_ch

Conversation

@TheNomet

@TheNomet TheNomet commented Oct 5, 2021

Copy link
Copy Markdown

Description

Adding commit_parser, changelog_pattern, change_type_map as customizable fields in customize.py

I noticed that when customizing the tool, the changelog was not properly created, given the impossibility to specify a commit_parser. While adding the feature, I also added the possibility to specify a regex for changelog_pattern and the mapping contained in change_type_map.

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 creating a changelog with a user-defined regex, the changelog should have the correct entries.

image

Steps to Test This Pull Request

  1. define a custom setup
  2. check that the changelog is created correctly using the defined regex

@codecov

codecov Bot commented Oct 6, 2021 •

Copy link
Copy Markdown

Codecov Report

Merging #442 (58dac7c) into master (bc9be40) will increase coverage by 0.02%.
The diff coverage is 98.91%.

@@            Coverage Diff             @@
##           master     #442      +/-   ##
==========================================
+ Coverage   98.05%   98.08%   +0.02%     
==========================================
  Files          39       39              
  Lines        1441     1511      +70     
==========================================
+ Hits         1413     1482      +69     
- Misses         28       29       +1     
Flag Coverage Δ
unittests 98.08% <98.91%> (+0.02%) ⬆️

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/cz/__init__.py 100.00% <100.00%> (ø)
commitizen/cz/customize/customize.py 95.08% <100.00%> (+0.85%) ⬆️
commitizen/defaults.py 100.00% <100.00%> (ø)
commitizen/exceptions.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 f924fe6...58dac7c. Read the comment docs.

@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.

Overall, the changes look good. Thanks for your contribution! Could you please add a test case to demonstrate how this affects changelog generation? Thanks!

@TheNomet

Copy link
Copy Markdown
Author

Hi @Lee-W, thank you for taking the time to look at this!
I added the test you asked for, let me know if that is good enough or more is needed!

@Lee-W

Lee-W commented Oct 11, 2021 •

Copy link
Copy Markdown
Member

Great work @TheNomet !

@woile I've check this PR. It looks good to me Could you please take a brief look at this one when you have time? Thanks!

@Lee-W
Lee-W requested a review from woile March 13, 2022 08:45
@Lee-W

Lee-W commented Mar 13, 2022

Copy link
Copy Markdown
Member

@woile I'll rebase and fix the conflicts if you're good with this feature. Thanks!

@woile

woile commented Mar 13, 2022

Copy link
Copy Markdown
Member

I'm ok with it, go ahead

@Lee-W
Lee-W force-pushed the feat/addional_config_ch branch from 1a7ed8d to 58dac7c Compare March 29, 2022 02:26
@Lee-W

Lee-W commented Mar 29, 2022

Copy link
Copy Markdown
Member

@TheNomet sorry for taking so long. Thanks so much for your contribution!

@woile I've rebased and read through this PR again. If there's no further comment, I'm planing on merging it tomorrow

@woile woile 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

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.

3 participants