Skip to main content

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

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]

Make sure to install the relevant pre-commit hooks with

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 to cz_conventional_commits types.
  • Add --simple-types option to use only the types used by cz_conventional_commits.
  • Add --conventional option to put the emoji in the commit message, making it compatible with cz_conventional_commits.

Inspiration

Metadata

Release files for cz-conventional-gitmoji 0.7.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cz-conventional-gitmoji 0.7.0
File Size Uploaded
cz_conventional_gitmoji-0.7.0.tar.gz 14.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for cz-conventional-gitmoji 0.7.0
File Interpreter ABI Platform
cz_conventional_gitmoji-0.7.0-py3-none-any.whl Python 3 none any Details

Total release size: 29.1 kB

Release files / cz_conventional_gitmoji-0.7.0.tar.gz

Download URL cz_conventional_gitmoji-0.7.0.tar.gz
Size 14.0 kB
Tags Source
SHA-256 checksum
How to use checksums
d1a672d570911147cc27a17ba15877e5ef279b91c51a8da9a89523f27325a261
BLAKE2b-256 checksum
How to use checksums
b8805402e92d019860c88772e5d7bcdd812f1e0c7f24b51fdbb503bdb55e64f2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.6.11

Release files / cz_conventional_gitmoji-0.7.0-py3-none-any.whl

Download URL cz_conventional_gitmoji-0.7.0-py3-none-any.whl
Size 15.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
278b817d306efa5b446db8d078288c42534cfff56662a344da0053c24b50701b
BLAKE2b-256 checksum
How to use checksums
60473d7d559850a8146bb08adb01486156339d49271aff38e11729707ab996ee
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.6.11

Release history Release notifications | RSS feed

This release

0.7.0 This release

2 release files

0.6.1

2 release files

0.6.0

2 release files

0.5.8

2 release files

0.5.7

2 release files

0.5.6

2 release files

0.5.5

2 release files

0.5.4

2 release files

0.5.3

2 release files

0.5.2

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.5

2 release files

0.4.4

2 release files

0.4.3

2 release files

0.4.2

2 release files

0.3.3

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page