Skip to main content

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 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

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

cz_conventional_gitmoji-0.5.7.tar.gz (14.0 kB view details)

Uploaded Source

Built Distribution

cz_conventional_gitmoji-0.5.7-py3-none-any.whl (15.3 kB view details)

Uploaded Python 3

File details

Details for the file cz_conventional_gitmoji-0.5.7.tar.gz.

File metadata

File hashes

Hashes for cz_conventional_gitmoji-0.5.7.tar.gz
Algorithm Hash digest
SHA256 2f34437abe35199b4dc04c0167c1af2b3442bf3c68580e4b8b656830a500fb5a
MD5 456d5868eaa08b84e38e7c72c39f1d23
BLAKE2b-256 f748286f6b83798edb86889ea0e3e7b984e5e9096cd64d40dc7db9de74909d2c

See more details on using hashes here.

File details

Details for the file cz_conventional_gitmoji-0.5.7-py3-none-any.whl.

File metadata

File hashes

Hashes for cz_conventional_gitmoji-0.5.7-py3-none-any.whl
Algorithm Hash digest
SHA256 da66bf3bb619c053ec04bba228b77149ea524361c1c21386f3dbcad44bd6f20a
MD5 8baabe24d66094964176ec7a31fdc569
BLAKE2b-256 00e20d289a058b92efa526c9964fc7eb04a0c2f22b8a185f128f6f7c6cf5d30e

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page