Commitizen plugin that prefixes commit messages with the common path or prefix of staged files.
Project description
cz-path
Commitizen plugin that prefixes commit messages with the common path or prefix of staged files.
Installation
Poetry
Example with dev group:
poetry add -G dev cz-path
Pip
pip install cz-path
Usage
Pass -n cz_path to cz or add it to your configuration file.
By default, src/ will be removed from any determined prefix. This can be customised by setting
remove_path_prefixes to []. You also may want to add other locations such as a module name.
Adding / is not required.
pyproject.toml
[tool.commitizen]
name = "cz_path"
remove_path_prefixes = ["src", "module_name"]
.cz.json
{
"commitizen": {
"name": "cz_path",
"remove_path_prefixes": ["src", "module_name"]
}
}
Scenarios
| Staged files | Path prefix | String prefix |
|---|---|---|
src/a.c, src/b.c |
src |
src/ |
src/a1.c, src/a2.c |
src |
src/a |
a.c, b.c |
(no option) | (no option) |
If no prefix is found amongst the staged files, only the choices project and empty will be given.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cz_path-0.0.3.tar.gz.
File metadata
- Download URL: cz_path-0.0.3.tar.gz
- Upload date:
- Size: 7.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ac039de5512bdf8d04c7c0ca2dd7b9a86d403559116622c1938beadbc66c9777
|
|
| MD5 |
6b96d564e2bbfc5aae7b6d27a1d23e80
|
|
| BLAKE2b-256 |
be698b6cfaed6311c3d7e18514c5f60afe050dd362da7efbead31ea7d34096a5
|
Provenance
The following attestation bundles were made for cz_path-0.0.3.tar.gz:
Publisher:
publish.yml on Tatsh/cz-path
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cz_path-0.0.3.tar.gz -
Subject digest:
ac039de5512bdf8d04c7c0ca2dd7b9a86d403559116622c1938beadbc66c9777 - Sigstore transparency entry: 685366106
- Sigstore integration time:
-
Permalink:
Tatsh/cz-path@75a431cbfa157278cb57a18f389fb26344b9b2d2 -
Branch / Tag:
refs/tags/v0.0.3 - Owner: https://github.com/Tatsh
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@75a431cbfa157278cb57a18f389fb26344b9b2d2 -
Trigger Event:
push
-
Statement type:
File details
Details for the file cz_path-0.0.3-py3-none-any.whl.
File metadata
- Download URL: cz_path-0.0.3-py3-none-any.whl
- Upload date:
- Size: 5.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c62ef9e444dd976505022b2e709192c1ca90dc5bdad808b90d3aac02e60fd329
|
|
| MD5 |
d1de4d3207b395c7c07689dce10f10e2
|
|
| BLAKE2b-256 |
c2fd1955f661dce5d7924d032953cd1f0ebff02834631fdc19aadd7d6d4699cc
|
Provenance
The following attestation bundles were made for cz_path-0.0.3-py3-none-any.whl:
Publisher:
publish.yml on Tatsh/cz-path
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cz_path-0.0.3-py3-none-any.whl -
Subject digest:
c62ef9e444dd976505022b2e709192c1ca90dc5bdad808b90d3aac02e60fd329 - Sigstore transparency entry: 685366107
- Sigstore integration time:
-
Permalink:
Tatsh/cz-path@75a431cbfa157278cb57a18f389fb26344b9b2d2 -
Branch / Tag:
refs/tags/v0.0.3 - Owner: https://github.com/Tatsh
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@75a431cbfa157278cb57a18f389fb26344b9b2d2 -
Trigger Event:
push
-
Statement type: