Giter Club home page Giter Club logo

cz-conventional-gitmoji's Introduction

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.