carloscuesta / gitmoji-cli

A gitmoji interactive cli tool for using emojis on commits. šŸ’»
https://www.npmjs.com/package/gitmoji-cli
MIT License
4.59k stars 206 forks source link

A filter to replace gitmoji code to gitmoji character and replace gitmoji character to gitmoji code #1246

Closed Freed-Wu closed 8 months ago

Freed-Wu commented 8 months ago

Description of the problem

When we git log --oneline, we will see:

725f254 :bug: Calculate check sum finally
4ec0b07 :technologist: Add receive_and_drop()
6c09fdd :technologist: Add loop for receive_data_frames()
76abe04 :technologist: Add send_and_receive_frame()
06ea47f :art: Move alloc outside loop
a4c27bc :alembic: receive data frames again

I hope gitmoji can provide a command line option to allow user:

git log --oneline | gitmoji --replace-gitmoji-code-to-gitmoji-character

Then we will get:

725f254 šŸ› Calculate check sum finally
4ec0b07 šŸ§‘ā€šŸ’» Add receive_and_drop()
6c09fdd šŸ§‘ā€šŸ’» Add loop for receive_data_frames()
76abe04 šŸ§‘ā€šŸ’» Add send_and_receive_frame()
06ea47f šŸŽØ Move alloc outside loop
a4c27bc āš—ļø receive data frames again
4d978e0 šŸ§‘ā€šŸ’» Add count_unreceived_data_frames()

Solution

Just replace some characters. It should be very simple!

Alternatives

Don't support it. User must see :bug: not :bug:.ZZ

Additional context

Screenshot from 2024-01-04 23-39-21

Validations

carloscuesta commented 8 months ago

Hey!

Thanks for opening such a detailed issue, I think it would add a lot of value to the cli do you want to take stab into implementing this?

Thanks šŸ˜Š

Freed-Wu commented 8 months ago

I am not sure which option name you want? --replace-gitmoji-code-to-gitmoji-character looks too long

segersniels commented 8 months ago

Not sure if this is something that should be handled by gitmoji if I'm completely honest. Sounds like a very small amount of people would benefit from this. I don't know of any but it would seem very unlikely to me if tools aren't available already that do exactly what you're asking for.

Freed-Wu commented 8 months ago

IMO, gitmoji generates these git commit message containing gitmoji code, so it is fair that it should provide some method to allow user to see these gitmoji character in git log.

segersniels commented 8 months ago

IMO, gitmoji generates these git commit message containing gitmoji code, so it is fair that it should provide some method to allow user to see these gitmoji character in git log.

At that point wouldn't it make more sense to configure gitmoji to use the emoji format instead of the code format?

Freed-Wu commented 8 months ago

There are many git repo have used gitmoji to generate git commit message. Change their commit messages from code format to emoji format is impossible.

segersniels commented 8 months ago

@Freed-Wu In that case something like emojify should be sufficient for what you're looking for. https://github.com/mrowa44/emojify

Freed-Wu commented 8 months ago

I try and find emojify miss some gitmoji code:

Screenshot from 2024-01-08 21-00-02

I think it should be the bug of emojify so I'll report it to them.