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

poetry add cz-conventional-gitmoji

or with pip:

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 contentional-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: main
    hooks:
      - id: conventional-gitmoji

Commit with a message in conventional format that contains a valid type mapped by conventional gitmoji and the gitmoji will automagically be added.

Features

  • Enable conventional gitmoji commit messages via cz commit.
  • 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.
  • Add hook to automatically prepend the appropriate gitmoji for the commit's type.

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

commitizen_gitmoji-0.1.1.tar.gz (12.3 kB view details)

Uploaded Source

Built Distribution

commitizen_gitmoji-0.1.1-py3-none-any.whl (12.5 kB view details)

Uploaded Python 3

File details

Details for the file commitizen_gitmoji-0.1.1.tar.gz.

File metadata

  • Download URL: commitizen_gitmoji-0.1.1.tar.gz
  • Upload date:
  • Size: 12.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.2.2 CPython/3.10.4 Linux/6.0.12-76060006-generic

File hashes

Hashes for commitizen_gitmoji-0.1.1.tar.gz
Algorithm Hash digest
SHA256 2c6eaca8e9d74ca7b91d0d508da02f2972200c460edff22a5a08aa94d92ccb3c
MD5 9b808c70c6858c8d3314c077e027ee85
BLAKE2b-256 5bb158030632474bd1eb65a7c2035435a4d1907b15be5cb02828eea5f041707d

See more details on using hashes here.

File details

Details for the file commitizen_gitmoji-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: commitizen_gitmoji-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 12.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.2.2 CPython/3.10.4 Linux/6.0.12-76060006-generic

File hashes

Hashes for commitizen_gitmoji-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5935d815006608a4a56e00f53943505e43092825450e8d310ab5fed0a7e27219
MD5 03719355731608e71ce56bdfc46bfa13
BLAKE2b-256 687548253189f83b45e7ffdcc1e1e9dce7351bd4fb6c7309c9152e38aff9b405

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