Type object
File match .changie.yaml .changie.yml
Schema URL https://catalog.lintel.tools/schemas/schemastore/changie/latest.json
Source https://changie.dev/schema.json

Validate with Lintel

npx @lintel/lintel check
Type: object

Config handles configuration for a project.

Properties

changesDir string required

Directory for change files, header file and unreleased files. Relative to project root. example: yaml changesDir: .changes

unreleasedDir string required

Directory for all unreleased change files. Relative to changesDir. example: yaml unreleasedDir: unreleased

headerPath string required

Header content included at the top of the merged changelog. A default header file is created when initializing that follows "Keep a Changelog".

Filepath for your changelog header file. Relative to changesDir. example: yaml headerPath: header.tpl.md

changelogPath string required

Filepath for the generated changelog file. Relative to project root. ChangelogPath is not required if you are using projects. example: yaml changelogPath: CHANGELOG.md

versionExt string required

File extension for generated version files. This should probably match your changelog path file. Must not include the period. example: yaml

for markdown changelogs

versionExt: md

changeFormat string required

Template used to generate change lines in version files and changelog. Custom values are created through custom choices and can be accessible through the Custom argument. example: yaml changeFormat: '* #{{.Custom.Issue}} {{.Body}}'

versionHeaderPath string

Filepath for your version header file relative to unreleasedDir. It is also possible to use the '--header-path' parameter when using the batch command.

versionFooterPath string

Filepath for your version footer file relative to unreleasedDir. It is also possible to use the '--footer-path' parameter when using the batch command.

versionFileFormat string

Customize the file name generated for new versions or release note files. The file is placed in the changesDir, so the full path is: {{.ChangesDir}}/{{.VersionFileFormat}}

fragmentFileFormat string

Customize the file name generated for new fragments. The default uses the component and kind only if configured for your project. The file is placed in the unreleased directory, so the full path is:

{{.ChangesDir}}/{{.UnreleasedDir}}/{{.FragmentFileFormat}}.yaml example: yaml fragmentFileFormat: "{{.Kind}}-{{.Custom.Issue}}"

versionFormat string

Template used to generate version headers.

componentFormat string

Template used to generate component headers. If format is empty no header will be included. If components are disabled, the format is unused.

kindFormat string

Template used to generate kind headers. If format is empty no header will be included. If kinds are disabled, the format is unused.

headerFormat string

Template used to generate a version header.

footerFormat string

Template used to generate a version footer. example: yaml

config yaml

custom:

  • key: Author type: string minLength: 3 footerFormat: |

    Contributors

    {{- range (customs .Changes "Author" | uniq) }}
body object

Body config allows you to customize the default body prompt

3 nested properties
minLength integer

Min length specifies the minimum body length

maxLength integer

Max length specifies the maximum body length

block boolean

Block allows multiline text inputs for body messages

components string[]

Components are an additional layer of organization suited for projects that want to split change fragments by an area or tag of the project. An example could be splitting your changelogs by packages for a monorepo. If no components are listed then the component prompt will be skipped and no component header included. By default no components are configured. example: yaml components:

  • API
  • CLI
  • Frontend
kinds KindConfig[]

Kinds are another optional layer of changelogs suited for specifying what type of change we are making. If configured, developers will be prompted to select a kind.

The default list comes from keep a changelog and includes; added, changed, removed, deprecated, fixed, and security. example: yaml kinds:

  • label: Added
  • label: Changed
  • label: Deprecated
  • label: Removed
  • label: Fixed
  • label: Security
custom Custom[]

Custom choices allow you to ask for additional information when creating a new change fragment. These custom choices are included in the change custom value. example: yaml

github issue and author name

custom:

  • key: Issue type: int minInt: 1
  • key: Author label: GitHub Name type: string minLength: 3
replacements Replacement[]

Replacements to run when merging a changelog. example: yaml

nodejs package.json replacement

replacements:

  • path: package.json find: ' "version": ".*",' replace: ' "version": "{{.VersionNoPrefix}}",'
newlines object

Configuration options for newlines before and after different elements.

21 nested properties
afterChange integer

Add newlines after change fragment

afterChangelogHeader integer

Add newlines after the header file in the merged changelog

afterChangelogVersion integer

Add newlines after adding a version to the changelog

afterComponent integer

Add newlines after component

afterFooterFile integer

Add newlines after footer file

afterFooter integer

Add newlines after footer template

afterHeaderFile integer

Add newlines after header file

afterHeaderTemplate integer

Add newlines after header template

afterKind integer

Add newlines after kind

afterReleaseNotes integer

Add newlines after release notes

afterVersion integer

Add newlines after version

beforeChange integer

Add newlines before change fragment

beforeChangelogVersion integer

Add newlines before adding a version to the changelog

beforeComponent integer

Add newlines before component

beforeFooterFile integer

Add newlines before footer file

beforeFooterTemplate integer

Add newlines before footer template

beforeHeaderFile integer

Add newlines before header file

beforeHeaderTemplate integer

Add newlines before header template

beforeKind integer

Add newlines before kind

beforeVersion integer

Add newlines before version

endOfVersion integer

Add newlines at the end of the version file

Post process options when saving a new change fragment. example: yaml

build a GitHub link from author choice

post:

envPrefix string

Prefix of environment variables to load for templates. The prefix is removed from resulting key map. example: yaml

if we have an environment variable like so:

export CHANGIE_PROJECT=changie

we can use that in our templates if we set the prefix

envPrefix: "CHANGIE_" versionFormat: "New release for {{.Env.PROJECT}}"

projects ProjectConfig[]

Projects allow you to specify child projects as part of a monorepo setup. example: yaml projects:

  • label: UI key: ui changelog: ui/CHANGELOG.md
  • label: Email Sender key: email_sender changelog: services/email/CHANGELOG.md
projectsVersionSeparator string

ProjectsVersionSeparator is used to determine the final version when using projects. The result is: project key + projectVersionSeparator + latest/next version. example: yaml projectsVersionSeparator: "_"

Definitions

BodyConfig object

Body config allows you to customize the default body prompt

minLength integer

Min length specifies the minimum body length

maxLength integer

Max length specifies the maximum body length

block boolean

Block allows multiline text inputs for body messages

Custom object

Custom defines a custom choice that is asked when using 'changie new'.

key string required

Value used as the key in the custom map for the change format. This should only contain alpha numeric characters, usually starting with a capital. example: yaml key: Issue

type string required

Specifies the type of choice which changes the prompt.

valuedescriptionoptions
stringFreeform textminLength and maxLength
blockMultiline textminLength and maxLength
intWhole numbersminInt and maxInt
enumLimited set of stringsenumOptions is used to specify values
optional boolean

If true, an empty value will not fail validation. The optional check is handled before min so you can specify that the value is optional but if it is used it must have a minimum length or value depending on type.

When building templates that allow for optional values you can compare the custom choice to an empty string to check for a value or empty.

example: yaml custom:

  • key: TicketNumber type: int optional: true changeFormat: >- {{- if not (eq .Custom.TicketNumber "")}} PROJ-{{.Custom.TicketNumber}} {{- end}} {{.Body}}
label string

Description used in the prompt when asking for the choice. If empty key is used instead. example: yaml label: GitHub Username

minInt integer

If specified the input value must be greater than or equal to minInt.

maxInt integer

If specified the input value must be less than or equal to maxInt.

minLength integer

If specified the string input must be at least this long

maxLength integer

If specified string input must be no more than this long

enumOptions string[]

When using the enum type, you must also specify what possible options to allow. Users will be given a selection list to select the value they want.

KindConfig object

Kind config allows you to customize the options depending on what kind was selected.

key string

Key is the value used for lookups and file names for kinds. By default it will use label if no key is provided. example: yaml key: feature

label string

Label is the value used in the prompt when selecting a kind. example: yaml label: Feature

format string

Format will override the root kind format when building the kind header. example: yaml format: '### {{.Kind}} Breaking Changes'

changeFormat string

Change format will override the root change format when building changes specific to this kind. example: yaml changeFormat: 'Breaking: {{.Custom.Body}}

additionalChoices Custom[]

Additional choices allows adding choices per kind

Post process options when saving a new change fragment specific to this kind.

skipGlobalChoices boolean

Skip global choices allows skipping the parent choices options.

skipBody boolean

Skip body allows skipping the parent body prompt.

skipGlobalPost boolean

Skip global post allows skipping the parent post processing.

auto string

Auto determines what value to bump when using batch auto or next auto. Possible values are major, minor, patch or none and the highest one is used if multiple changes are found. none will not bump the version. Only none changes is not a valid bump and will fail to batch. example: yaml auto: minor

NewlinesConfig object

Configuration options for newlines before and after different elements.

afterChange integer

Add newlines after change fragment

afterChangelogHeader integer

Add newlines after the header file in the merged changelog

afterChangelogVersion integer

Add newlines after adding a version to the changelog

afterComponent integer

Add newlines after component

afterFooterFile integer

Add newlines after footer file

afterFooter integer

Add newlines after footer template

afterHeaderFile integer

Add newlines after header file

afterHeaderTemplate integer

Add newlines after header template

afterKind integer

Add newlines after kind

afterReleaseNotes integer

Add newlines after release notes

afterVersion integer

Add newlines after version

beforeChange integer

Add newlines before change fragment

beforeChangelogVersion integer

Add newlines before adding a version to the changelog

beforeComponent integer

Add newlines before component

beforeFooterFile integer

Add newlines before footer file

beforeFooterTemplate integer

Add newlines before footer template

beforeHeaderFile integer

Add newlines before header file

beforeHeaderTemplate integer

Add newlines before header template

beforeKind integer

Add newlines before kind

beforeVersion integer

Add newlines before version

endOfVersion integer

Add newlines at the end of the version file

PostProcessConfig object

PostProcessConfig allows adding additional custom values to a change fragment after all the other inputs are complete.

key string required

Key to save the custom value with

value string required

Value of the custom value as a go template

ProjectConfig object

ProjectConfig extends changie to support multiple changelog files for different projects inside one repository.

label string required

Label is the value used in the prompt when selecting a project. example: yaml label: Frontend

key string required

Key is the value used for unreleased and version output paths. example: yaml key: frontend

changelog string required

ChangelogPath is the path to the changelog for this project. example: yaml changelog: src/frontend/CHANGELOG.md

replacements Replacement[] required

Replacements to run when merging a changelog for our project. example: yaml

nodejs package.json replacement

replacements:

  • path: ui/package.json find: ' "version": ".*",' replace: ' "version": "{{.VersionNoPrefix}}",'
Replacement object

Replacement handles the finding and replacing values when merging the changelog.

path string required

Path of the file to find and replace in. Also supports Go filepath globs. example: yaml

Will match any .json file in the current directory

replacements:

  • path: .json find: ' "version": ".",' replace: ' "version": "{{.VersionNoPrefix}}",'
find string required

Regular expression to search for in the file. Capture groups are supported and can be used in the replace value.

replace string required

Template string to replace the line with.

flags string

Optional regular expression mode flags. Defaults to the m flag for multiline such that ^ and $ will match the start and end of each line and not just the start and end of the string.

For more details on regular expression flags in Go view the regexp/syntax.