arvinxx / gitmoji-commit-workflow

😉 Gitmoji Commit Workflow
MIT License
220 stars 27 forks source link

Issue with 👷‍♂️ #576

Closed mehdicopter closed 1 year ago

mehdicopter commented 2 years ago

Hello,

I found a bug using the emoji 👷‍♂️

When I use the code the test passes

echo ':construction_worker: ci: test' | commitlint # passes

But when I use the emoji itself it fails

 echo '👷 ci: test' | commitlint
⧗   input: 👷 ci: test
✖   👷 is not in the correct gitmoji list, please check the emoji code on https://gitmoji.dev/. [start-with-gitmoji]

✖   found 1 problems, 0 warnings
ⓘ   Get help: https://github.com/conventional-changelog/commitlint/#what-is-commitlint

It happens with several other emojis as well

mehdicopter commented 2 years ago

It does work when I did fix the code within the json file

{
  "emoji": "👷",
  "entity": "👷",
  "code": ":construction_worker_man:",
  "description": "Add or update CI build system.",
   "name": "construction-worker",
   "semver": null
},

I did change :construction_worker: into :construction_worker_man:

You can verify it by this code snippet

const name = require("emoji-name-map");
const unicode = require("emoji-unicode-map");

console.log(name.get(":construction_worker:")); // undefined
console.log(unicode.get("👷")); // construction_worker_man
arvinxx commented 1 year ago

fixed in commitlint-plugin-gitmoji@2.2.5