[changelog] section controls how the changelog is generated, including header, body, and footer templates, as well as postprocessing and output options.
Configuration Options
Header template rendered at the beginning of the changelog.The template context contains the full list of releases in the
releases variable. See templating for more details.Example:Body template rendered for each release in the changelog.If the changelog contains 3 releases, this template is rendered 3 times, once for each release. The template context contains one release in the
release variable.Example:Footer template rendered at the end of the changelog.The template context contains the full list of releases in the
releases variable.Example:Remove leading and trailing whitespace from the body template.This is useful for adding indentation to templates for readability while keeping the output clean.Example:
Render the changelog body even if there are no releases to process.Example:
An array of regex-based postprocessors to manipulate the changelog before outputting.Each postprocessor has a
pattern (regex) and either replace (string) or replace_command (shell command).Examples:Output file path for the changelog.You can also use the
--output argument to override this value.Example:Complete Example
Here’s a comprehensive changelog configuration:Template Variables
The following variables are available in changelog templates:version- The current release versioncommits- Array of commits in the releasecommit_id- Git commit SHAtimestamp- Release timestampprevious- Information about the previous releasereleases- All releases (in header/footer)github- GitHub integration data (if enabled)remote- Remote configuration