A commitizen plugin that combines gitmoji and conventional.
Project description
cz-conventional-gitmoji
A commitizen plugin that combines gitmoji and conventional commits.
Installation
With pip
or any other package manager of your choice, the usual way:
pip install cz-conventional-gitmoji
Usage
This package can be used as a normal commitizen
plugin, either by specifying the name on the command line
cz --name cz_gitmoji commit
or by setting it in your pyproject.toml
[tool.commitizen]
name = "cz_gitmoji"
This will make commitizen
use the commit message parsing rules defined by this plugin, which are 100% compatible with conventional commits. As such, the gitmojis are completely optional and all commands will continue to validate commit messages in conventional format just fine. This is useful if you're transitioning an existing repo to cz-conventional-gitmoji
or you work in a team in which some colleagues don't like gitmojis.
gitmojify
Apart from the conventional-gitmoji rules, this package provides the gitmojify
command which is also available as a pre-commit hook. The command reads a commit message either from cli or a commit message file and prepends the correct gitmoji based on the type. If the message already has a gitmoji, it is returned as is.
$ gitmojify -m "init: initial version"
๐ init: initial version
To use it as a pre-commit hook, install this packages as well as commitizen
and put the following into your .pre-commit-config.yaml
repos:
- repo: https://github.com/ljnsn/cz-conventional-gitmoji
rev: 0.2.4
hooks:
- id: conventional-gitmoji
Make sure to install the relevant pre-commit hooks with
To use commitizen
hooks with conventional-gitmoji
, you need to add the package as an extra dependency.
- repo: https://github.com/commitizen-tools/commitizen
rev: v3.29.0
hooks:
- id: commitizen
additional_dependencies: [cz-conventional-gitmoji]
pre-commit install --install-hooks
Commit with a message in conventional format that contains a valid type mapped by conventional gitmoji and the gitmoji will automagically be added.
Type mappings
Types to gitmojis
Type | Emoji |
---|---|
fix |
๐ |
feat |
โจ |
docs |
๐ |
style |
๐จ |
refactor |
โป๏ธ |
perf |
โก๏ธ |
test |
โ |
build |
๐ท |
ci |
๐ |
revert |
โช๏ธ |
dump |
๐ฅ |
hotfix |
๐๏ธ |
deploy |
๐ |
ui |
๐ |
init |
๐ |
security |
๐๏ธ |
secret |
๐ |
bump |
๐ |
fix -lint |
๐จ |
wip |
๐ง |
dep-drop |
โฌ๏ธ |
dep-bump |
โฌ๏ธ |
pin |
๐ |
analytics |
๐ |
dep-add |
โ |
dep-rm |
โ |
config |
๐ง |
script |
๐จ |
lang |
๐ |
typo |
โ๏ธ |
poop |
๐ฉ |
merge |
๐ |
package |
๐ฆ๏ธ |
external |
๐ฝ๏ธ |
resource |
๐ |
license |
๐ |
boom |
๐ฅ |
asset |
๐ฑ |
accessibility |
โฟ๏ธ |
source-docs |
๐ก |
beer |
๐ป |
text |
๐ฌ |
db |
๐๏ธ |
logs-add |
๐ |
logs-rm |
๐ |
people |
๐ฅ |
ux |
๐ธ |
arch |
๐๏ธ |
design |
๐ฑ |
mock |
๐คก |
egg |
๐ฅ |
ignore |
๐ |
snap |
๐ธ |
experiment |
โ๏ธ |
seo |
๐๏ธ |
types |
๐ท๏ธ |
seed |
๐ฑ |
flag |
๐ฉ |
catch |
๐ฅ |
animation |
๐ซ |
deprecation |
๐๏ธ |
auth |
๐ |
fix-simple |
๐ฉน |
exploration |
๐ง |
dead |
โฐ๏ธ |
test-fail |
๐งช |
logic |
๐ |
health |
๐ฉบ |
infra |
๐งฑ |
devxp |
๐งโ๐ป |
money |
๐ธ |
threading |
๐งต |
validation |
๐ฆบ |
chore |
๐งน |
Features
- Enable conventional gitmoji commit messages via
cz commit
. - Add hook to automatically prepend the appropriate gitmoji for the commit's type.
- Add
--simple-emojis
option to use only the emojis relating tocz_conventional_commits
types. - Add
--simple-types
option to use only the types used bycz_conventional_commits
. - Add
--conventional
option to put the emoji in the commit message, making it compatible withcz_conventional_commits
.
Inspiration
Project details
Release history Release notifications | RSS feed
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
File details
Details for the file cz_conventional_gitmoji-0.5.1.tar.gz
.
File metadata
- Download URL: cz_conventional_gitmoji-0.5.1.tar.gz
- Upload date:
- Size: 13.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.4.20
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 44b66181321d0c077fa6c0772bb36cfc251d3848afa9d2c7c5301a22b65c42a0 |
|
MD5 | 91fd070ef96fa2e6acfc97931223d091 |
|
BLAKE2b-256 | 1ce119c004ccab668296d866ae03d7522b79d62b6f2e4f32a6c5ef3c1172b652 |
File details
Details for the file cz_conventional_gitmoji-0.5.1-py3-none-any.whl
.
File metadata
- Download URL: cz_conventional_gitmoji-0.5.1-py3-none-any.whl
- Upload date:
- Size: 15.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.4.20
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 075a745ea54e83fd82f76b878b59fe34891d41e7a2bdb0fd1e3ec9f3027809a9 |
|
MD5 | b0050676be7482761284cf827e9a2fe5 |
|
BLAKE2b-256 | c8d4665ccfaa9ab969ffdaabd3af21b68e31468fa78b5606e02695713056f76d |