Git Product home page Git Product logo

cz-emoji's Introduction

cz-emoji

Commitizen adapter formatting commit messages using emojis.

cz-emoji allows you to easily use emojis in your commits using commitizen.

? Select the type of change you are committing: (Use arrow keys)
❯ feature   🌟  A new feature
  fix       🐞  A bug fix
  docs      πŸ“š  Documentation change
  refactor  🎨  A code refactoring change
  chore     πŸ”©  A chore change

Install

Globally

npm install --global cz-emoji

# set as default adapter for your projects
echo '{ "path": "cz-emoji" }' > ~/.czrc

Locally

npm install --save-dev cz-emoji

Add this to your package.json:

"config": {
  "commitizen": {
    "path": "cz-emoji"
  }
}

ℹ️ pnpm requires you to specify node_modules/cz-emoji.

Usage

$ git cz

Customization

By default cz-emoji comes ready to run out of the box. Uses may vary, so there are a few configuration options to allow fine tuning for project needs.

How to

Configuring cz-emoji can be handled in the users home directory (~/.czrc) for changes to impact all projects or on a per project basis (package.json). Simply add the config property as shown below to the existing object in either of the locations with your settings for override.

{
  "config": {
    "cz-emoji": {}
  }
}

Configuration Options

Types

By default cz-emoji comes preconfigured with the Gitmoji types.

An Inquirer.js choices array:

{
  "config": {
    "cz-emoji": {
      "types": [
        {
          "emoji": "🌟",
          "code": ":star2:",
          "description": "A new feature",
          "name": "feature"
        }
      ]
    }
  }
}

Scopes

An Inquirer.js choices array:

{
  "config": {
    "cz-emoji": {
      "scopes": ["home", "accounts", "ci"]
    }
  }
}

Symbol

A boolean value that allows for an using a unicode value rather than the default of Gitmoji markup in a commit message. The default for symbol is false.

{
  "config": {
    "cz-emoji": {
      "symbol": true
    }
  }
}

Skip Questions

An array of questions you want to skip:

{
  "config": {
    "cz-emoji": {
      "skipQuestions": ["scope", "issues"]
    }
  }
}

You can skip the following questions: scope, body, issues, and breaking. The type and subject questions are mandatory.

Customize Questions

An object that contains overrides of the original questions:

{
  "config": {
    "cz-emoji": {
      "questions": {
        "body": "This will be displayed instead of original text"
      }
    }
  }
}

Customize the subject max length

The maximum length you want your subject has

{
  "config": {
    "cz-emoji": {
      "subjectMaxLength": 200
    }
  }
}

Examples

Commitlint

Commitlint can be set to work with this package with the following configuration:

commitlint.config.js

const pkg = require('./package.json')

// Check if the user has configured the package to use conventional commits.
const isConventional = pkg.config ? pkg.config['cz-emoji']?.conventional : false

// Regex for default and conventional commits.
const RE_DEFAULT_COMMIT = /^(?::.*:|(?:\u00a9|\u00ae|[\u2000-\u3300]|\ud83c[\ud000-\udfff]|\ud83d[\ud000-\udfff]|\ud83e[\ud000-\udfff]))\s(?<emoji>\((?<scope>.*)\)\s)?.*$/gm
const RE_CONVENTIONAL_COMMIT = /^^(?<type>\w+)(?:\((?<scope>\w+)\))?\s(?<emoji>:.*:|(?:\u00a9|\u00ae|[\u2000-\u3300]|\ud83c[\ud000-\udfff]|\ud83d[\ud000-\udfff]|\ud83e[\ud000-\udfff]))\s.*$/gm

module.exports = {
  rules: {
    'cz-emoji': [2, 'always']
  },
  plugins: [
    {
      rules: {
        'cz-emoji': ({ raw }) => {
          const isValid = isConventional
            ? RE_CONVENTIONAL_COMMIT.test(raw)
            : RE_DEFAULT_COMMIT.test(raw)

          const message = isConventional
            ? `Your commit message should follow conventional commit format.`
            : `Your commit message should be: <emoji> (<scope>)?: <subject>`

          return [isValid, message]
        }
      }
    }
  ]
}

Let me know if you are interested in having the above configuration published as a commitlint plugin.

Other projects

  • Fauda: configuration made simple.
  • Commitizen Emoji: Commitizen adapter formatting commit messages using emojis.
  • Reading Time: Medium's like reading time estimation.

License

MIT Β© Nicolas Gryman

cz-emoji's People

Contributors

anoff avatar byronmejia avatar clumsy-coder avatar dependabot[bot] avatar greenkeeper[bot] avatar harlan-zw avatar jb1905 avatar jiangweixian avatar kstolte avatar matissjanis avatar micgro42 avatar ngryman avatar nshtg avatar reekenx avatar rikardgehlin avatar rodrimaia avatar simrobin avatar spoutnik97 avatar trevorburnham avatar vecpeng avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

cz-emoji's Issues

Weird space between Emoji and Subject

We get spaces between emoji and subject for every option skipped from questions.

{
  "path": "cz-emoji",
  "config": {
    "cz-emoji": {
      "types": [
        {
          "emoji": "✨",
          "code": "✨",
          "description": "Introducing new features.",
          "name": "feature"
        }
      ],
      "scopes": [
        "home",
        "accounts",
        "ci"
      ],
      "skipQuestions": [
        "scope",
        "issues",
        "body",
        "breaking"
      ]
    }
  }
}

and the result is this

✨   A subject

Feature request: How to customise the commit message format ?

How to customise the commit message format ?
Is there any option to provide it in the config ?
for eg:-

"config": {
    "commitizen": {
      "path": "cz-emoji",
      "cz-emoji": {
        "format": "[name] [scope]: [emoji] [subject]"
      }
    }
  }

gives feat (scope): ✨ new feature

Custom breaking question not working

I'm trying to add a custom question to the "BREAKING" part of the commit wizard but its not getting the change

config:

"cz-emoji": {
      "conventional": true,
      "questions":{
        "type" : "Selecciona el tipo del commit:",
        "scope" : "ΒΏCuΓ‘l es el scope (archivo, tag o nombre)? (opcional):",
        "subject": "TΓ­tulo descriptivo corto:",
        "body" : "DescripciΓ³n detallada del cambio (opcional):",
        "breaking": "ΒΏEstos cambios rompen alguna parte del sistema? (opcional):",
        "issues": "Issues relacionados (ej:#1, #2, ...) (opcional):"
      },
}

image (1)

Am I doing something wrong?

Example Repos

A list of example repos using this commit convention in the readme would be helpful. It's hard to figure out how best to integrate this into a release cycle.

cz-emoji ignores package.json config if package version format is not "x.y.z"

Hello,

We have a cz-emoji config in package.json and after changing our package version from "x.y.z" to "x.y" (omitting the 0 patch version), git-cz is ignoring the custom config and uses the default one:
image

If we add the third ".0" to the version, it shows prompts specified in the config.

image

EDIT: The issue appears to be fixed in the latest version of this package.
From what I see, it doesn't use readPkg() to parse package.json which was failing because of the version.

Generating CHANGELOG.md

Have you used this to generate a changelog file?
Semantic release and standard version expect the angular preset but this adapter uses the emoji value

Action required: Greenkeeper could not be activated 🚨

🚨 You need to enable Continuous Integration on all branches of this repository. 🚨

To enable Greenkeeper, you need to make sure that a commit status is reported on all branches. This is required by Greenkeeper because it uses your CI build statuses to figure out when to notify you about breaking changes.

Since we didn’t receive a CI status on the greenkeeper/initial branch, it’s possible that you don’t have CI set up yet. We recommend using Travis CI, but Greenkeeper will work with every other CI service as well.

If you have already set up a CI for this repository, you might need to check how it’s configured. Make sure it is set to run on all new branches. If you don’t want it to run on absolutely every branch, you can whitelist branches starting with greenkeeper/.

Once you have installed and configured CI on this repository correctly, you’ll need to re-trigger Greenkeeper’s initial pull request. To do this, please delete the greenkeeper/initial branch in this repository, and then remove and re-add this repository to the Greenkeeper integration’s white list on Github. You'll find this list on your repo or organization’s settings page, under Installed GitHub Apps.

can't use git cz

macos catalina
npm 6.13.7
node 13.11.0

(node:6997) UnhandledPromiseRejectionWarning: TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined
at validateString (internal/validators.js:120:11)
at Object.dirname (path.js:1128:5)
at /Users/zhao/.nvm/versions/node/v13.11.0/lib/node_modules/cz-emoji/index.js:45:55
at async loadConfig (/Users/zhao/.nvm/versions/node/v13.11.0/lib/node_modules/cz-emoji/index.js:50:31)
(node:6997) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:6997) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Allow per project .czrc customizations to cz-emoji

Currently the script checks for package.json for config['cz-emoji'] object and if it doesn't find it, it defaults to the global .czrc (in home directory) but it is possible to have a project level .czrc. And commitizen supports that. I'm using cz-emoji outside of js projects too and they don't always have package.json

looks like project is dead

i've been following issues and pull request and looks like the project is no longer maintained, someone else know of some project similar and alive?

Type doesn't get added in commit message

Sorry if I'm doing something wrong but when I try to commit something on a repo using this package and husky pre-commit hooks, type doesn't get added to the commit message.

Therefore, the commitlint-config-emoji returns an error telling me that type is empty (see image below)

Capture d’écran 2021-02-14 aΜ€ 21 05 46

Am I the only one having this problem?

Packages versions if relevant.
Capture d’écran 2021-02-14 aΜ€ 21 34 41

Global commitizen doesn't work

Did you forget to push new version of cz-emoji to NPM?

The error is exactly here, I think.

readPkg().then(res => (res ? readFromCzrc(`${path.dirname(res.path)}/.czrc`) : null))

res.path will be undefined if there is no local .czrc.

Vulnerabilities in depdendencies

In recent cz-emoji version:

$ grep cz-emoji package.json
23:        "cz-emoji": "^1.2.1",

yarn audit reports vulnerabilities:

$ yarn audit
[..]
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ low           β”‚ Denial of Service                                            β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ Package       β”‚ mem                                                          β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ Patched in    β”‚ >=4.0.0                                                      β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ Dependency of β”‚ cz-emoji                                                     β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ Path          β”‚ cz-emoji > inquirer-maxlength-input-prompt > jest > jest-cli β”‚
β”‚               β”‚ > yargs > os-locale > mem                                    β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ More info     β”‚ https://nodesecurity.io/advisories/1084                      β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ low           β”‚ Prototype Pollution                                          β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ Package       β”‚ minimist                                                     β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ Patched in    β”‚ >=0.2.1 <1.0.0 || >=1.2.3                                    β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ Dependency of β”‚ cz-emoji                                                     β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ Path          β”‚ cz-emoji > inquirer-maxlength-input-prompt > jest > jest-cli β”‚
β”‚               β”‚ > istanbul-api > istanbul-reports > handlebars > optimist >  β”‚
β”‚               β”‚ minimist                                                     β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ More info     β”‚ https://nodesecurity.io/advisories/1179                      β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

It is low priority vulnerabilities, but it would be nice to have no vulnerabilities at all since we use this package in multiple projects.

Maybe version bump of inquirer-maxlength-input-prompt could solve this?

Symbol feature appears to be broken

When I use the symbol feature, it appears that I get an error:

Cannot read properties of undefined (reading 'name')
Aborting commit due to empty commit message.

Haven't had a chance to look into it, but seems related to how search is performed in the json file.

How do I use this with `validate-commit-msg`?

Hey nice lib. How do I use this with validate-commit-msg?

{
    "validate-commit-msg": {
      "types": "cz-emoji"
    }
}

results in

./node_modules/validate-commit-msg/lib/validateMessage.js:29
    types = Object.keys(require(types).types);
                   ^

TypeError: Cannot convert undefined or null to object
    at validateMessage (./node_modules/validate-commit-msg/lib/validateMessage.js:29:20)
    at validate (./node_modules/validate-commit-msg/lib/cli.js:32:10)
    at readFile (./node_modules/validate-commit-msg/lib/cli.js:59:5)
    at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:446:3)

> husky - commit-msg hook failed (add --no-verify to bypass)
> husky - to debug, use 'npm run commitmsg'
/Users/james/code/tradie/tradie-v4/node_modules/commitizen/dist/cli/strategies/git-cz.js:102
        throw error;

UnhandledPromiseRejectionWarning: TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be one of type string, Buffer, or URL

I updated cz-emoji to 1.3.0 and now I'm getting the following error when running git cz:

(node:2705) UnhandledPromiseRejectionWarning: TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be one of type string, Buffer, or URL. Received type undefined
    at readFile (fs.js:295:10)
    at internal/util.js:278:30
    at new Promise (<anonymous>)
    at readFile (internal/util.js:277:12)
    at loadConfig (/Users/wujekbogdan/htdocs/cm-web-app/node_modules/cz-emoji/index.js:16:10)
    at async getConfig (/Users/wujekbogdan/htdocs/cm-web-app/node_modules/cz-emoji/index.js:36:6)
(node:2705) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
(node:2705) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

commitlint support for emoji + conventional commit with emoji before type(scope) (@commitlint/config-conventional commitlint-config-gitmoji)

Hello
I have a need to use the following commit syntax:
πŸ› fix (sample): short description

The syntax with the conventional: true setting is not what I'm looking for
I would also like to use commitlint together
With commitlint I use the following packages:
@commitlint/cli @commitlint/config-conventional commitlint-config-gitmoji

In the default configuration, cz-emoji works correctly with these packages
But if I pass the conventional: true setting it won't work

But in this case I would like to use conventional commit + emojis, using the emoji in the beginning, different from the current conventional that puts the emoji before the short description

I got this result and working correctly by editing the line of the formatHead function in index.js
Changing the syntax to ${type.emoji}${type.name}${formatScope(scope)}: works as expected.
So the result will be this: :emoji: type(scope): desc

Would it be possible to implement a configuration to activate this syntax?
I don't particularly know how to implement such a configuration

Thanks in advance!

Emoji Icon resource/list

I basically want to have the same types as provided by the default cz-conventional-log package. I figure others maybe doing the same so I'll update this with a link to the commit when I'm done.

Meanwhile, this is the emoji list I'm using: https://gist.github.com/rxaviers/7360908 is there a better one? Is there anything inaccurate about using this? ... I guess I'm not sure what "beetle" (the value) should correspond too.

Update: my commit and list of types: Falieson/TRAM@8115b06#diff-13e9c5d8bf5e473ad89e449a16c9ef5fR6

Enjoy and Thanks!

building_construction emoji image needs updating

 {
    "emoji": "πŸ—",
    "code": ":building_construction:",
    "description": "Making architectural changes.",
    "name": "arch"
  },
{
    "emoji": "πŸ—οΈ",
    "code": ":building_construction:",
    "description": "Making architectural changes.",
    "name": "arch"
  },

again not sure if this will come through on the issue comment, but you can check the types.json file and see that the image is different than what is on
https://gitmoji.dev/

Feature request: Customise commit questions

I tried using cz-customizable but that's a separate plugin that overrides cz-emoji (and doesn't support emojis).

My issue is every time I commit I get asked:

? Select the type of change you're committing: 
? Specify a scope: 
? Write a short description:
? List any issue closed (#1, ...): 
? Provide a longer description:

I only care about the 1st, 3rd and 5th questions. It's a bummer to be skipping those questions every time. Is there a config I can use to choose just the questions I want? On cz-customizable this was done using a skipQuestions config.

card_file_box emoji image needs updating

{
    "emoji": "πŸ—ƒ",
    "code": ":card_file_box:",
    "description": "Performing database related changes.",
    "name": "db"
  },
{
    "emoji": "πŸ—ƒοΈ",
    "code": ":card_file_box:",
    "description": "Performing database related changes.",
    "name": "db"
  },

check the difference in types.json and https://gitmoji.dev/

Can't commit without scope

input (passes)
:white_check_mark: (something) Test

input (fail)
:white_check_mark: Test

βœ– subject may not be empty [subject-empty]
βœ– type may not be empty [type-empty]


// commitlint.config.js

module.exports = {
    extends: [
        './node_modules/commitlint-config-gitmoji'
    ],
    parserPreset: {
        parserOpts: {
            headerPattern: /^(:\w*:)(?:\s)(?:\((.*?)\))?\s((?:.*(?=\())|.*)(?:\(#(\d*)\))?/,
            headerCorrespondence: ['type', 'scope', 'subject', 'ticket'],
        }
    }
};

using options in .czrc ?

Is it possible to use the options in the .czrc file instead of package.json ?

i.e. i'm trying to do something like this

.czrc

{
  "path": "./node_modules/cz-emoji",
  "cz-emoji": {
    "skipQuestions": ["scope", "issues"]
  }
}

Bug with displaying emojis

I installed cz-emoji globally and locally, but now the list of commit types has changed and emoticons are displayed with an error.
I would like to have a standard list of commit types from cz-conventional-changelog with emoticons from the cz-emoji example, as shown in the screenshot:
screenshot-1
but instead I have this:
screenshot-2
You can watch the video at the link: Google Drive. It shows the detailed problem of displaying emoticons and highlight colors.

Please tell me how to configure the standard option?

I do not understand English well, so please give a detailed answer.

Feature request: Display length of commit message

Hi,
It has happened multiple times in my team that people type the commit message but doesn't get any feedback that the message is too long until after everything has been processed. This causes the devs to have to recommit, and once again, hope they get under the 75-char limit. And as I hope you can see, this causes some frustration. So it would be nice to have it displayed, sort of like I've seen it done in @commitlint/prompt.

kind regards

Commit Input Message Error!

Hello, I'm on [email protected] and set the config "conventional": true, "symbol": false.
image
and I had set .commitlintrc.js
image
but it still can't work!
Has anyone ever had a similar problem?Please give me some advice!

Issue on path (node 12.12.0)

Hello,

I have found a bug on node 12.12.0 with [email protected].
Everything works on node 12.12.0 with [email protected].

I guess the culprit is this commit: 5312f27

❌

❯ git cz
[email protected], [email protected]

(node:97971) UnhandledPromiseRejectionWarning: TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received type undefined
    at validateString (internal/validators.js:112:11)
    at Object.dirname (path.js:1129:5)
    at /Users/****/.fnm/node-versions/v12.12.0/installation/lib/node_modules/cz-emoji/index.js:45:48
    at async loadConfig (/Users/****/.fnm/node-versions/v12.12.0/installation/lib/node_modules/cz-emoji/index.js:50:31)
(node:97971) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:97971) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

βœ…

❯ git cz
[email protected], [email protected]

? Select the type of change you're committing: (Use arrow keys or type to search)
❯ style                  🎨  Improving structure / format of the code.
  perf                   ⚑️  Improving performance.
  prune                  πŸ”₯  Removing code or files.
  fix                    πŸ›  Fixing a bug.
  quickfix               πŸš‘  Critical hotfix.
  feature                ✨  Introducing new features.
  docs                   πŸ“  Writing docs.
(Move up and down to reveal more choices)

Expected `columns` to be a number, got undefined.

Describe the bug
I\ve got undefined for columns when commiting.

To Reproduce
Steps to reproduce the behavior:

  1. Run the script
  2. Select emoji
  3. Fill out the subject etc
  4. See error when formating

Expected behavior
Show formatted commit in editor.

Additional context
(node:9740) UnhandledPromiseRejectionWarning: TypeError: Expected `columns` to be a number, got undefined at module.exports (C:\Users\rcich\assembless.tech\node_modules\cz-emoji\node_modules\cli-truncate\index.js:18:9) at format (C:\Users\rcich\assembless.tech\node_modules\cz-emoji\index.js:163:16) at processTicksAndRejections (internal/process/task_queues.js:97:5) (node:9740) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of aness on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1) (node:9740) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Parenthesis not inserted in scope

I'm loving the concept of this adapter, but there's an issue with scopes, parenthesis are not inserted, I'm getting commit messages like these:

{emoji} {scope}{commit message}

instead of

{emoji} ({scope}) {commit message}

alembic emoji needs image update

{
    "emoji": "βš—",
    "code": ":alembic:",
    "description": "Experimenting new things.",
    "name": "experiment"
  },
{
    "emoji": "βš—οΈ",
    "code": ":alembic:",
    "description": "Experimenting new things.",
    "name": "experiment"
  },

not sure this will come through on this issue comment, but you can check the types.json file emoji image and see that it is not the same as on
https://gitmoji.dev/

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.