gitmoji-commit-workflow
gitmoji-commit-workflow copied to clipboard
Wrong emoji for ci according to gitmoji
Currently there is a wrench emoji:
https://github.com/arvinxx/gitmoji-commit-workflow/blob/c986d43c8e4a20a947a66a44881528655e1fa218/packages/changelog/src/transformer/typeDisplayName.ts#L36
But gitmoji uses this symbol for adding ci 👷
Also stumbled across this. Fixed by using this: npm install --save-dev [email protected]
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];
},
},
}],
};