diff --git a/docs/shared/recipes/nx-release/customize-conventional-commit-types.md b/docs/shared/recipes/nx-release/customize-conventional-commit-types.md index 28ee037411ed3..f709f2cb68ae5 100644 --- a/docs/shared/recipes/nx-release/customize-conventional-commit-types.md +++ b/docs/shared/recipes/nx-release/customize-conventional-commit-types.md @@ -148,3 +148,34 @@ If you want to use custom, non-standard conventional commit types, you can defin } } ``` + +## Including Invalid Commits in the Changelog + +Nx Release ignores all commits that do not conform to the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/#summary) standard by default. A special `__INVALID__` type is available in situations where you want to process invalid messages. + +{% callout type="warning" title="Invalid != Unmatched" %} +It's worth noting that this type will only include **invalid** commits. _e.g. those that do not follow the `: ...` format._ Commits that are otherwise valid, but with a type that is not enabled, will not be matched by this group. +{% /callout %} + +This can be useful in cases where you have not managed to be consistent with your use of the Conventional Commits standard (e.g. when applying it retroactively to an existing codebase) but still want a changelog to be generated with the contents of each commit message and/or for invalid commits to still affect project versioning. + +{% callout type="info" title="Alternative to Conventional Commits" %} +If you cannot adhere to the Conventional Commits standard for your commits, file based versioning via Nx Release Version Plans could be a good alternative for managing your releases. See our docs on [File Based Versioning](/recipes/nx-release/file-based-versioning-version-plans) for more information. +{% /callout %} + +```json {% fileName="nx.json" %} +{ + "release": { + "conventionalCommits": { + "types": { + "__INVALID__": { + "semverBump": "patch", // Note: the default is "none" + "changelog": { + "title": "Uncategorized changes" + } + } + } + } + } +} +```