commitizen / cz-cli

The commitizen command line utility. #BlackLivesMatter
http://commitizen.github.io/cz-cli/
MIT License
16.9k stars 552 forks source link

Add scope propositions from commit history #225

Open mfilotto opened 8 years ago

mfilotto commented 8 years ago

Hi, Thanks for your nice tool, that's very handy. It would be awesome to have scope propostions from previous scopes from the commit history. Because it's hard to remember what we've previously used so it's error prone, as a restult we have scope duplicates.

pmcelhaney commented 8 years ago

This is a good idea. It wouldn't be part of the cli though. It would be part of the adapter, e.g., the conventional changelog adapter.

You can also create your own adapter pretty easily. That's what I did. I just copied the code from conventional changelog and changed the scope section so that it uses a list, like the prompt section. I then saved the file to in my repo as cz-adapter.js and updated my package.json to show commitzen where to find it.

  "config": {
    "commitizen": {
      "path": "./cz-adapter"
    }
  },
bertho-zero commented 4 years ago

When the scope list is defined in the scope-enum rule, we could then have a selector like the type. (#720)

lgersman commented 4 years ago

I would really love to see this option in cz-cli.

or at least a working example / gist of an conventional changelog adapter as described above.

cheers,

lars