-
-
Notifications
You must be signed in to change notification settings - Fork 297
feat(conventional_commits): add ability to overide settings from tool... #1570
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
feat(conventional_commits): add ability to overide settings from tool... #1570
Conversation
....commitizen.customize
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@ ## master #1570 +/- ## ========================================== + Coverage 97.33% 97.98% +0.64% ========================================== Files 42 58 +16 Lines 2104 2723 +619 ========================================== + Hits 2048 2668 +620 + Misses 56 55 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
...2 is standard dependency
I decided not to drag in the jinja2.Template/string.Template dichotomy, as jinja2 is project dependency so the string.Template part will be unused.
....commitizen.customize
Description
Adds ability to override settings using [tool.commitizen.customize] in the cz_conventional_commits
Checklist
Code Changes
poetry all
locally to ensure this change passes linter check and testsDocumentation Changes
poetry doc
locally to ensure the documentation pages renders correctlyExpected Behavior
You use
conventional_commits
commitizen, and using [tool.commitizen.customize] config section you override selected settingsSteps to Test This Pull Request
Add this to pyproject.tomp in existing project using conventional_commits and update_changelog_on_bump = true:
do
cz bump --dry-run
and observe that changelog headers have gitmoji.Test that other behavior is identical to unpatched version
test that
bump_map = {"^.+!$" = "MAJOR", "^feat" = "MAJOR", "^fix" = "MINOR", "^refactor" = "MINOR", "^perf" = "MINOR"}
bumps MINOR not PATCH part on fix commit, test that other things are unchanged.Test other settings.
Additional Context
This is starting shot at #1385
To test this I copied tests for cz_customize, removed name=... from all configs there and removed the tests that don't make
sense, for example exception for missing customize section.