Conventionalish
Patch Commitizen's Conventional Commits implementation with additional prefixes.
By default, Commitizen will use its Conventional Commits implementation, so when you run cz commit, you will get a choice of
fix:feat:docs:style:refactor:perf:test:build:ci:
Commitizen has a robust system for building your own commit patterns, and it's great if you want to start from scratch. But if you want to make a small change to the defaults and keep the nice prompts, commit-message linting, and changelog-building provided by Commitizen, you will have to create or update six patterns or regexps. This script inherits from ConventionalCommitsCz and patches in new choices and associated properties. FWIW, despite the ish in the name conventionalish, these changes will still meet the Conventional Commits standard (at least as much as Commitizen does) as long as the feat: and fix: prefixes remain.
Should you want to accomplish this by hand:
- inherit from ConventionalCommitsCz
- overload
.questions()# for commit prompts - overload
.schema_pattern()# for commit-message linting
Will your addition affect versioning?
- overload
.bump_pattern# for commitizen bump - overload
.bump_map# for commitizen bump - overload
.commit_parser# for commitizen changelog - overload
.change_type_map# for commitizen changelog - overload
.changelog_pattern# for commitizen changelog
Usage
To make these changes using a script:
- clone this project into your project root
- edit the
QUESTIONSvalue at the top ofquestions.py. The default value will give near-identical behavior to the Commitizen default. - install conventionalish in your project venv (
poetry add .\conventionalish;pip install .\conventionalish; ...) or upload to PyPi with a new name. - run with
cz -n cz_conventionalishor add the following topyproject.toml
[tool.commitizen]
name = "cz_conventionalish"
Troubleshooting, Q&A
I updated the file, but Commitizen doesn't recognize the changes.
This is an installed package, depending how you installed it, you may need to:
- delete any
commitizenish/buildorcommitizenish/egg-infodirectories - uninstall
- reinstall
How can I change the project name (conventionalish)?
- change the name of this folder after you clone it
- update the line
name="conventionalish"inconventionalish/pyproject.tomltoname="new_folder_name"
How can I change the commit-rule name (cz_conventionalish)?
- change the filename
conventionalish/cz_conventionalish.pytoconventionalish/cz_new_name.py - change the line
{ include = "cz_conventionalish.py" }inconventionalish/pyproject.tomlto{ include = "cz_new_name.py" }
Author
Shay Hill (shay_public@hotmail.com)
Metadata
Release files for conventionalish 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| conventionalish-0.1.1.tar.gz | 4.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| conventionalish-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 8.7 kB
Release files / conventionalish-0.1.1.tar.gz
| Download URL | conventionalish-0.1.1.tar.gz |
|---|---|
| Size | 4.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5bd53430ddcfc38ec56354686d88754b8b14a7a6ebf4603177ac12e4bc5b6298
|
|
BLAKE2b-256 checksum How to use checksums |
3d77602fb3ba2f797b7d2a996128f36d747b6c77632920b2e66c5916fbac3054
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.3.1 CPython/3.11.0 Windows/10
|
Release files / conventionalish-0.1.1-py3-none-any.whl
| Download URL | conventionalish-0.1.1-py3-none-any.whl |
|---|---|
| Size | 4.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7f0076f455701b053173f4459d0ebec4cedbabcadee37de5ceec892a2158bbd6
|
|
BLAKE2b-256 checksum How to use checksums |
3a2a6a35a287b35889186dd2fbb702482d87758f54776baf6ab9869d308c2de3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.3.1 CPython/3.11.0 Windows/10
|