ngryman / cz-emoji

Commitizen adapter formatting commit messages using emojis.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

AndreAugustoDev opened this issue · comments

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!

Hey @AndreAugustoAAQ, would #32 achieve what you want? If so, I can try to continue the work of the original author.

@ngryman yes, an option to customize the message format is what I'm looking for, it would be a great addition
I'll look at this PR and maybe I can help too

@AndreAugustoAAQ That would awesome! I had a couple of feedback left in the original PR. Then I think it should be good to merge.

It would be nice to have this working.

Thank you guys for all work.