cocogitto
cocogitto copied to clipboard
[FEATURE] Add command to explain the different commit types
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
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).
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.
I personally always use the conventional commit convention, and I'm sure a lot of others do too.
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: ?
Haha yeah I mean angular conventional commit*