Configuration is based on the conventional changelog config spec.

The configuration must be specified in a .versionrc file in the root of the repository. YAML or JSON can be used to declare the configuration. host, owner and repository will not be looked up from package.json as convco is build tool agnostic.

Additionally scopeRegex and template can be specified to restrict scopes or use a different template directory.

Most configuration is used with convco-changelog, but scopeRegex is used in the other commands.

Configuration

config key description default value
header the header of the changelog "# Changelog\n\n"
types show/hide/group commit types see default configuration
preMajor automatically set by convco true if version <1.0.0 else false
commitUrlFormat a URL to a specific commit hash "{{host}}/{{owner}}/{{repository}}/commit/{{hash}}"
compareUrlFormat a URL to compare two git shas "{{host}}/{{owner}}/{{repository}}/compare/{{previousTag}}...{{currentTag}}"
issueUrlFormat a URL to the issue "{{host}}/{{owner}}/{{repository}}/issues/{{id}}"
userUrlFormat a URL to the user’s profile "{{host}}/{{user}}"
releaseCommitMessageFormat not used "chore(release): {{currentTag}}
issuePrefixes used to detect issues in the commit body [ "#" ]
host the host to be used in commitUrlFormat, compareUrlFormat, issueUrlFormat extracted from git remote get-url origin
owner the repository owner extracted from git remote get-url origin
repository the repository url extracted from git remote get-url origin
template template directory path empty, the build in template is used
scopeRegex limit valid scopes "[[:alnum:]]+(?:[-_/][[:alnum:]]+)*"

URL formats

The commit, compare, issue and user url format can

Default configuration

# .versionrc
---
header: |
  # Changelog
types:
- type: feat
  section: Features
  hidden: false
- type: fix
  section: Fixes
  hidden: false
- type: build
  section: Other
  hidden: true
- type: chore
  section: Other
  hidden: true
- type: ci
  section: Other
  hidden: true
- type: docs
  section: Documentation
  hidden: true
- type: style
  section: Other
  hidden: true
- type: refactor
  section: Other
  hidden: true
- type: perf
  section: Other
  hidden: true
- type: test
  section: Other
  hidden: true
preMajor: false
commitUrlFormat: '{{@root.host}}/{{@root.owner}}/{{@root.repository}}/commit/{{hash}}'
compareUrlFormat: '{{@root.host}}/{{@root.owner}}/{{@root.repository}}/compare/{{previousTag}}...{{currentTag}}'
issueUrlFormat: '{{@root.host}}/{{@root.owner}}/{{@root.repository}}/issues/{{issue}}'
userUrlFormat: '{{host}}/{{user}}'
releaseCommitMessageFormat: 'chore(release): {{currentTag}}'
issuePrefixes:
- '#'
host: null
owner: null
repository: null
template: null
commitTemplate: null
scopeRegex: '[[:alnum:]]+(?:[-_/][[:alnum:]]+)*'
lineLength: 80
wrapDisabled: false
linkCompare: true
linkReferences: true
merges: false
firstParent: false
stripRegex: ''