cocogitto icon indicating copy to clipboard operation
cocogitto copied to clipboard

[FEATURE] Add command to explain the different commit types

Open tqwewe opened this issue 2 years ago • 5 comments

Is your feature request related to a problem? Please describe. Sometimes I can get confused which commit type is suitable for my changes.

Describe the solution you'd like A command to describe the built in commit types.

$ coco explain
  - ci: for when ...
  - docs: for when ...
  - feat: for when ...
  - fix: for when ...
  - ...

A much more extensive feature would be for coco to guess what type should be used based on the changed files. For example, if a Cargo.toml, gulpfile.js, package.json, makefile is the only file changed and the user types coco feat "...", perhaps it chould show a warning:

$ coco feat "add build script"
[warning] you seem to be changing a build file, would you like to use `build` type instead of `feat` (Y/N): Y
Updating commit type to `build`.
Created commit:
  build: add build script

But this feature could be implemented separately in the future if desired.

Describe alternatives you've considered Manually open the angularjs docs when I forget the commit types and what each is for.

Additional context N/A

tqwewe avatar Dec 13 '21 13:12 tqwewe

A command to describe the built in commit types.

That would be great and cheap to implement.

A much more extensive feature would be for coco to guess what type should be used based on the changed files. For example, if a Cargo.toml, gulpfile.js, package.json, makefile is the only file changed and the user types coco feat "...", perhaps it chould show a warning:

This is interesting and look similar to what I had in mind for scope suggestion. However this would require to maintain a default configuration for a lot of languages/package managers. Making such feature exhaustive and accurate would require a tremendous amount of work.

Ideally this should be extendable and not resides in cog.toml but in a global cog config file.
It would provides the default (i.e. widely used language and their package managers (probably the top 20 languages in this year stackoverflow survey).

oknozor avatar Dec 13 '21 14:12 oknozor

Hi, I started working on this (only the explain part).

Should the explain command also handle the keywords from the angular commit convention ? I think this would be more helpful than only feat/fix from the conventional commit spec.

lucas-dclrcq avatar Mar 09 '22 10:03 lucas-dclrcq

I personally always use the conventional commit convention, and I'm sure a lot of others do too.

tqwewe avatar Mar 09 '22 11:03 tqwewe

I personally always use the conventional commit convention, and I'm sure a lot of others do too.

is this a lapsus for "angular commit convention" :smile: ?

oknozor avatar Mar 09 '22 12:03 oknozor

Haha yeah I mean angular conventional commit*

tqwewe avatar Mar 10 '22 07:03 tqwewe