Skip to main content

A commitizen plugin that combines gitmoji and conventional commits in a lightweight way.

Project description

cz-conventional-gitmoji

A commitizen plugin that combines gitmoji and conventional commits in a lightweight way. This fork of cz-conventional-gitmoji adds a simple-types and conventional option to the template. We will only have the emojis that are related to the cz_conventional_commits types and they will be added to <subject> section of the commit message.

init: 🎉 initial version

Installation

With pip or any other package manager of your choice, the usual way:

pip install cz-light-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_light_gitmoji commit

or by setting it in your pyproject.toml

[tool.commitizen]
name = "cz_light_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-light-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/sasirven/cz-light-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.

Inspiration

Author

  • ljnsn (Original Author)
  • Samuel Sirven
    • Samuel Sirven
    • Samuel Sirven

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_light_conventional_gitmoji-0.3.1.tar.gz (10.2 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file cz_light_conventional_gitmoji-0.3.1.tar.gz.

File metadata

File hashes

Hashes for cz_light_conventional_gitmoji-0.3.1.tar.gz
Algorithm Hash digest
SHA256 f04dd78f42e91c1c71ded922da7a3bf3b3957c47b6f6d742edce9b8470d11e25
MD5 d1ba9acba374bbc8390179760f79d50d
BLAKE2b-256 a6a15cf35481a6d3646ac9ad0bab1ee7d0ebfdba0117a33e31f5e43af77d8a20

See more details on using hashes here.

File details

Details for the file cz_light_conventional_gitmoji-0.3.1-py3-none-any.whl.

File metadata

File hashes

Hashes for cz_light_conventional_gitmoji-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7c9f388bb6abde3eab4193d8e56481dc28723c2ea1000c01c1572c1682db052e
MD5 52f08e7eb3ac7527985fc27f113e7b9b
BLAKE2b-256 89c09e2a0a4ba0b66f39d56848419b696320cd634c62ca29b6d0b9554e80698c

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