Zhengqbbb / cz-git

cz-git | czg 🛠️ DX first and more engineered, lightweight, customizable, standard output format Commitizen adapter and CLI

Home Page:https://cz-git.qbb.sh

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Feature Request] Allow to skip type

cletter7 opened this issue · comments

commented

💭 Describe the feature

In the monorepo I am working with we only need scope and not the type. We don't actually use the commit type for generating changelog, etc., but we still want to be able to see which package was impacted by some specific commit by its name. So currently we are using type as a scope and then use formatMessageCB to put the type in the place of scope. Something like:

formatMessageCB: ({ type, subject }) => `(${type}): ${subject}`

But in this case we are not able to choose multiple packages as you can only select one type. Ideally I'd like to skip type and be able to choose multiple options from the scope.

Could you make type skippable?

💡 Proposed Solution

Add possibility to specify type in the skipQuestions option so that the type question is skipped. Example:

skipQuestions: ['type']

Actually it didn't configure's type support because cz-git follows the standard Conventional Commits specification.

But it can also work !!! : skipQuestions: ['type']

Below is my understanding of the configuration implementation. If you have other needs, welcome leave message

{
    skipQuestions: ['type', 'body', 'breaking', 'footerPrefix', 'footer'],
    enableMultipleScopes: true,
    formatMessageCB: ({ scope, subject }) => scope ? `(${scope}): ${subject}` : subject,
}
CleanShot.2023-10-11.at.10.25.56.mp4
commented

It works indeed. Just here the type of skipQuestions doesn't say that you can skip the type so I didn't even try it. Maybe worth updating the docs.

Thank you, closing the issue.