English
Options - Engineering Related
alias
- description : define commonly used commit message alias
- type :
{ [alias: string]: string }
- default :
{ fd: "docs: fix typos" }
TIP
More usage and demo ⇒ can see the recipes
scopes
- description : custom selection module scope command line display information
- type :
string[] | Array<{ name: string, value?: string }>
- default :
[]
TIP
If you define a scope-enum
using the commitlint rule, it will be imported automatically.
⇒ can see the recipes
scopeOverrides
- description : After customizing a specific type, override module scope command line display information
- type :
{ [type: string]: string[] | Array<{ name: string, value?: string }> } | undefined
- default :
undefined
- example :
scopeOverrides: { "test": ["e2eTest", "unitTest"] }
- use : Displays custom module scope selection when selecting module scope after selecting specific commit type :
type
TIP
If you define scopeOverrides
then define generic scopes
scopeFilters
- description : Filter select of prompt to select module scopes by the scope.value
- type :
string[]
- default :
[".DS_Store"]
enableMultipleScopes
- description : Whether to enable the use of multiple scopes mode
- type :
boolean
- default :
false
TIP
Try running command to enable multiple scopes mode in the current session
- Commitizen CLI:
checkbox=1 cz
- czg CLI:
czg checkbox
Demo And Usage ⇒ see the recipes
scopeEnumSeparator
- description : Separator between scopes in multiple scopes mode
- type :
string
- default :
,
allowCustomScopes
- description : whether to display custom options when selecting module scope (custom)
- type :
boolean
- default :
true
- use : not using
commitlint
and want to turn off custom options in select.
TIP
It will automatically detect whether the definition of the commitlint rule scope-enum
is strict, and it will not be displayed automatically.
allowEmptyScopes
- description : whether to display an empty option when selecting module scope (empty)
- type :
boolean
- default :
true
TIP
It will automatically detect whether the definition of the commitlint rule scope-empty
is strict, and it will not be displayed automatically.
markBreakingChangeMode
- description : Add an extra BREAKINGCHANGE question asking if you need to add the "!" mark in the header
- use : When you want to add the ! mark in the header, Highlight that the commit message belongs to BREAKINGCHANGE. you can use this option.
- type :
boolean
- default :
false
TIP
more usage and demo ⇒ see the recipes
allowBreakingChanges
- description : a specific type that allows BREAKING CHANGES
- type :
string[]
- default :
["feat", "fix"]
upperCaseSubject
- description : Whether to automatically capitalize the first character of the short description (subject)
- type :
boolean
- default :
false
breaklineNumber
- description : body and BREAKING CHANGES the line wraps automatically according to the character exceeding this value
- type :
number
- default :
100
- use : When commitlint is not used and normalization is to be used
TIP
Line breaks mainly based on word completeness
If commitlint is used, it will automatically read body-max-line-length
and set it.
breaklineChar
- description : newline characters in detailed descriptions (body) and breaking changes (BREAKING CHANGES)
- type :
string
- default :
"|"
skipQuestions
- description : The question specified by the custom selection is not displayed
- type :
Array<"scope" | "body" | "breaking" | "footerPrefix" | "footer">
- default :
[]
issuePrefixs
- description : custom select issue prefix
- type :
Array<{ value: string, name: string }>
- default :
[{ value: "closed", name: "closed: ISSUES has been processed" }]
allowCustomIssuePrefixs
- description : whether to display custom options when selecting ISSUES prefixs (custom)
- type :
boolean
- default :
true
allowEmptyIssuePrefixs
- description : whether to display an empty option when selecting ISSUES prefixs (skip)
- type :
boolean
- default :
true
maxHeaderLength
- description: Define the length of the header in the commit message, giving the verification information on the command line
- type:
number
- default:
Infinity
- use : when commitlint is not used and normalization is to be used
TIP
If you use commitlint, it will automatically read header-max-length
and set it to give a prompt on the command line
maxSubjectLength
- description: Define the length of the subject in the commit message, giving the verification information on the command line
- type:
number
- default:
Infinity
- use : When commitlint is not used and normalization is to be used
TIP
If using commitlint will automatically read subject-max-length
and set it to give a prompt on the command line.
minSubjectLength
- description: Define the length of the subject in the commit message, giving the verification information on the command line
- type:
number
- default :
0
- use : When commitlint is not used and normalization is to be used
TIP
If commitlint is used, it will automatically read subject-min-length
and set it to give a prompt on the command line
useCommitSignGPG
- description : use GPG sign commit message
- type :
boolean
- default :
false
TIP
- Only take effect
czg
cz-git CLI - Try running command to enable directly use GPG sign commit message in the current session
- cz-git CLI:
czg gpg
- cz-git CLI:
About GPG sign commit message information. can see: Zhengqbbb/cz-git#58
formatMessageCB
- description : Use the callback fn can custom finally message formatter
- type :
(messageMod: CommitMessageOptions) => string
ts
interface CommitMessageOptions {
type: string
scope: string
emoji: string
markBreaking: string
subject: string
defaultHeader: string
body: string
breaking: string
footer: string
defaultMessage: string
}
interface CommitMessageOptions {
type: string
scope: string
emoji: string
markBreaking: string
subject: string
defaultHeader: string
body: string
breaking: string
footer: string
defaultMessage: string
}
- default :
({ defaultMessage }) => defaultMessage