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

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.

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.3.3.tar.gz (12.4 kB view details)

Uploaded Source

Built Distribution

cz_conventional_gitmoji-0.3.3-py3-none-any.whl (13.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: cz_conventional_gitmoji-0.3.3.tar.gz
  • Upload date:
  • Size: 12.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.4 Linux/6.5.0-1025-azure

File hashes

Hashes for cz_conventional_gitmoji-0.3.3.tar.gz
Algorithm Hash digest
SHA256 de3787511fdecea6693a4e6d212fe3f36425219267b731e2fd05788dbaf735dc
MD5 d01638da32dc7fd660d8579cc8cd76a5
BLAKE2b-256 23ad0497ad48377d29708f64a5898410a65b71ee2e8378eb085d5c4704729c78

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cz_conventional_gitmoji-0.3.3-py3-none-any.whl
Algorithm Hash digest
SHA256 05ba50fcd86de8efe7c85f0e2230dffbe08c9cdc5d768f41403ce943aef333cb
MD5 4b5718d248464e1f2523ceb9c6683766
BLAKE2b-256 6d4afadcca29059f2a786254de242ab1f7e497051565e21abeb73fa97719f080

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