ngryman / cz-emoji

Commitizen adapter formatting commit messages using emojis.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Feature request: Customise commit questions

dialex opened this issue · comments

I tried using cz-customizable but that's a separate plugin that overrides cz-emoji (and doesn't support emojis).

My issue is every time I commit I get asked:

? Select the type of change you're committing: 
? Specify a scope: 
? Write a short description:
? List any issue closed (#1, ...): 
? Provide a longer description:

I only care about the 1st, 3rd and 5th questions. It's a bummer to be skipping those questions every time. Is there a config I can use to choose just the questions I want? On cz-customizable this was done using a skipQuestions config.

Hey @dialex,

Sorry for the late answer. Currently there is no option to do that.
Like you suggested this could be easily implemented with a skipQuestions option.

Would you be willing to open a PR for that?

It's fine, thanks for replying.
I can't sorry, my JS knowledge is very limited.

I'll update the title of this post, so that we can wait for someone else.

Hey @dialex, I ended up implementing it (alongside some other minor improvements). Would you mind giving the pre-release a try? You can do so by specifying next as the version. Thanks!

Tried the latest version and works swell to skip q's. Well done! Small visual issue though is that if you skip the scope, then the emoji and the subject is right on top of eachother. Most likely on row 119 where you format the scope and return "" instead of " " if scope is skipped :)

Is there any chance of an option in the config to overwrite/customize the prompts? I would like to reformulate them a bit for a better fit in my current team ie "Provide a longer description:" -> "Provide a longer description (optional):"

cheers

Couldn't wait, so fixed the bug and the ability to customize the questions. Made a PR for it #29 :D

@RikardGehlin Thanks for the PR!

I'll wait for that PR to be merged and then publish a fresh new version with these changes. Thanks for your help and patience guys 🙏

...and it's published as next or (1.2.0-1) 🎉