feat(conventional_commits): add ability to overide settings from tool… by AxTheB · Pull Request #1570 · commitizen-tools/commitizen · GitHub
Skip to content

feat(conventional_commits): add ability to overide settings from tool…#1570

Open
AxTheB wants to merge 2 commits intocommitizen-tools:masterfrom
AxTheB:feat/customizable-conventional-commits
Open

feat(conventional_commits): add ability to overide settings from tool…#1570
AxTheB wants to merge 2 commits intocommitizen-tools:masterfrom
AxTheB:feat/customizable-conventional-commits

Conversation

@AxTheB
Copy link
Copy Markdown

@AxTheB AxTheB commented Aug 7, 2025

….commitizen.customize

Description

Adds ability to override settings using [tool.commitizen.customize] in the cz_conventional_commits

Checklist

Code Changes

  • Add test cases to all the changes you introduce
  • Run poetry all locally to ensure this change passes linter check and tests
  • Manually test the changes:
    • Verify the feature/bug fix works as expected in real-world scenarios
    • Test edge cases and error conditions
    • Ensure backward compatibility is maintained
    • Document any manual testing steps performed
  • Update the documentation for the changes

Documentation Changes

  • Run poetry doc locally to ensure the documentation pages renders correctly
  • Check and fix any broken links (internal or external) in the documentation

Expected Behavior

You use conventional_commits commitizen, and using [tool.commitizen.customize] config section you override selected settings

Steps to Test This Pull Request

Add this to pyproject.tomp in existing project using conventional_commits and update_changelog_on_bump = true:

[tool.commitizen.customize]
change_type_map = {"feat" = "✨ Feat", "fix" = "🐛 Bug Fix", "refactor" = "♻️  Refactor", "perf" = "⚡️ Perf"}

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.

@codecov
Copy link
Copy Markdown

codecov Bot commented Aug 7, 2025

@AxTheB
Copy link
Copy Markdown
Author

AxTheB commented Aug 7, 2025

@Lee-W Lee-W added this to the 4.9.0 milestone Aug 17, 2025
@Lee-W Lee-W modified the milestones: 4.9.0, 4.10.0 Sep 9, 2025
@Lee-W Lee-W self-assigned this Sep 9, 2025
@AxTheB AxTheB force-pushed the feat/customizable-conventional-commits branch from 2cfd272 to 80b550c Compare September 22, 2025 10:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants