1.0.0 • Published 1 year ago

cz-conventional-changelog-with-issue-id v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

cz-conventional-changelog-with-issue-id

Status: npm version npm downloads

Part of the commitizen family. Prompts for conventional changelog standard.

Makes specifying an issue id mandatory. The desired commit types can be configured to make the issue id optional.

Configuration

package.json

Like commitizen, you specify the configuration of cz-conventional-changelog through the package.json's config.commitizen key.

{
// ...  default values
    "config": {
        "commitizen": {
            "path": "./node_modules/cz-conventional-changelog",
            "disableScopeLowerCase": false,
            "disableSubjectLowerCase": false,
            "maxHeaderWidth": 100,
            "maxLineWidth": 100,
            "defaultType": "",
            "defaultScope": "",
            "defaultSubject": "",
            "defaultBody": "",
            "defaultIssues": "",
            "issuePrefix": "#",
            "typesWithOptionalIssueIds": ["chore", "docs", "revert"],
            "types": {
              ...
              "feat": {
                "description": "A new feature",
                "title": "Features"
              },
              ...
            }
        }
    }
// ...
}

Environment variables

The following environment variables can be used to override any default configuration or package.json based configuration.

Environment variablepackage.jsonDefaultDescription
CZ_MAX_HEADER_WIDTHmaxHeaderWidth100This limits how long a commit message head can be.
CZ_MAX_LINE_WIDTHmaxLineWidth100Commit message bodies are automatically wrapped. This decides how long the lines will be.
CZ_TYPEdefaultTypeundefinedThe default type.
CZ_SCOPEdefaultScopeundefinedThe default scope.
DISABLE_SCOPE_LOWERCASEdisableScopeLowerCasefalseDecides if converting given scope to lowercase should be prevented.
DISABLE_SUBJECT_LOWERCASEdisableSubjectLowerCasefalseDecides of converting given subjest to lowercase should be prevented.
CZ_SUBJECTdefaultSubjectundefinedA default subject.
CZ_BODYdefaultBodyundefinedA default body.
CZ_ISSUESdefaultIssuesundefinedDefault issue(s).
CZ_ISSUE_PREFIXissuePrefix#The issue prefix.
CZ_TYPES_WITH_ISSUES_OPTIONALtypesWithOptionalIssueIds"chore", "docs", "revert"The commit types that may be made without associated issue id(s).

Commitlint

If using the commitlint js library, the "maxHeaderWidth" configuration property will default to the configuration of the "header-max-length" rule instead of the hard coded value of 100. This can be ovewritten by setting the 'maxHeaderWidth' configuration in package.json or the CZ_MAX_HEADER_WIDTH environment variable.