Skip to content

jolbol1/cz-gitmojis

 
 

Repository files navigation

Contributors Forks Stargazers Issues MIT License LinkedIn Gitmoji


Logo

cz-gitmojis

A commitizen adapter for the gitmoji convention of https://gitmoji.dev/

Report Bug · Request Feature

About The Project

An adapter that uses the gitmojis package to add the gitmoji standard to commitizen.

Gitmoji is an initiative to standardize and explain the use of emojis on GitHub commit messages.

Using emojis on commit messages provides an easy way of identifying the purpose or intention of a commit with only looking at the emojis used. As there are a lot of different emojis I found the need of creating a guide that can help to use emojis easier.

(back to top)

Usage

This guide assumes you already have commitizen. To add the adaptor run npm i cz-gitmojis

Configuration

package.json

Like commitizen, you specify the configuration of cz-conventional-changelog through the package.json's config.commitizen key.

{
// ...  default values
    "config": {
        "commitizen": {
            "path": "./node_modules/cz-gitmojis",
            "disableSubjectLowerCase": false,
            "maxHeaderWidth": 100,
            "maxLineWidth": 100,
            "defaultType": "",
            "defaultSubject": "",
            "defaultBody": "",
            "defaultIssues": "",
            "types": {
              ...
              "feat": {
                "description": "A new feature",
                "title": "Features"
              },
              ...
            }
        }
    }
// ...
}

Environment variables

The following environment variables can be used to override any default configuration or package.json based configuration.

  • CZ_TYPE = defaultType
  • CZ_SUBJECT = defaultSubject
  • CZ_BODY = defaultBody
  • CZ_MAX_HEADER_WIDTH = maxHeaderWidth
  • CZ_MAX_LINE_WIDTH = maxLineWidth

Commitlint

If using the commitlint js library, the "maxHeaderWidth" configuration property will default to the configuration of the "header-max-length" rule instead of the hard coded value of 100. This can be ovewritten by setting the 'maxHeaderWidth' configuration in package.json or the CZ_MAX_HEADER_WIDTH environment variable.

(back to top)

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

(back to top)

License

Distributed under the MIT License. See LICENSE.txt for more information.

(back to top)

Contact

Your Name - @JollyShopland - [email protected]

Project Link: https://github.com/jolbol1/cz-gitmojis

(back to top)

About

A commitizen adapter for the gitmoji convention of https://gitmoji.dev/

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Languages

  • JavaScript 100.0%