SKalt / git-cc

a git extension to help write conventional commits
Other
91 stars 9 forks source link

fix(cli): prevents next step until an available commit type is selected #19

Closed lincolnjpg closed 2 years ago

lincolnjpg commented 2 years ago

Hi,

Recently, I started using git-cc and I'm really enjoying it. I've found a behavior that I don't know if is intended.

When a invalid commit type (a commit type that is not listed in the option list) is selected, user can still advances to the next screen and then to the next. But after confirming, user returns to the initial screen.

With this PR, user can only advance to the select commit scope screen when a valid commit type was selected in the previous screen.

SKalt commented 2 years ago

When an invalid commit type (a commit type that is not listed in the option list) is selected, the user still advances to the next screen and then to the next. But after confirming, the user returns to the initial screen.

That's definitely undesired. I'll merge this PR now and cut a release later today.

Recently, I started using git-cc and I'm really enjoying it.

I'm glad to hear that :) Thanks for submitting a PR.

SKalt commented 2 years ago

I'd like to alert the user about the invalid option, too, but implementing error messages (#20) isn't a blocker for this PR.

lincolnjpg commented 2 years ago

Thanks @SKalt and keep up the good work :)