Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong emoji for ci according to gitmoji #156

Open
zorgick opened this issue Jun 16, 2021 · 2 comments
Open

Wrong emoji for ci according to gitmoji #156

zorgick opened this issue Jun 16, 2021 · 2 comments

Comments

@zorgick
Copy link

zorgick commented Jun 16, 2021

Currently there is a wrench emoji:

But gitmoji uses this symbol for adding ci 馃懛

@jlalmes
Copy link

jlalmes commented Jul 28, 2021

Also stumbled across this. Fixed by using this: npm install --save-dev [email protected]

@jlalmes
Copy link

jlalmes commented Aug 3, 2021

Encountered more issues with this package. Ended up creating my own Gitmoji commitlint plugin - it's super simple.

Run npm i -D gitmojis, create commitlint.config.js, paste code below & you're done!

const { gitmojis } = require('gitmojis');

module.exports = {
  rules: {
    'gitmoji-rule': [2, 'always'],
  },
  plugins: [{
    rules: {
      'gitmoji-rule': ({ header }) => {
        const commit = header.trim();
        const [commitEmoji, ...rest] = commit.split(' ');
        const commitMessage = rest.join(' ').trim();
        if (!commitMessage) {
          return [false, 'Commit message is required.'];
        }
        if (!commitEmoji) {
          return [false, 'Commit emoji is required.'];
        }
        const gitmoji = gitmojis.find((_gitmoji) => _gitmoji.emoji === commitEmoji);
        if (!gitmoji) {
          return [false, 'Valid Gitmoji is required.'];
        }
        if (commitMessage.length <= 6) {
          return [false, 'Commit message must be over 6 characters'];
        }
        return [true];
      },
    },
  }],
};

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants