Release Notes
The [release_notes] section of knope.toml customizes how Knope renders release notes, both as
changelogs and forge releases.
change_templates Knope 0.21.1+
Section titled “change_templates ”An array of templates to customize each change entry.
[release_notes]change_templates = [ "* $summary by $commit_author_name ($commit_hash)",]Different variables are available for different types of changes.
Knope will use the first template containing only valid variables for a given change.
If no template is applicable, Knope will use a default template.
The default templates are equivalent to ["### $summary\n\n$details", "- $summary"], using a small Markdown section for
complex changes and a single bullet for simple changes.
Variables
Section titled “Variables”$summary
Section titled “$summary”Every change has a summary. It’s one of:
- The title line (first non-empty line after the frontmatter, typically starting with a
#) of a change file - Everything after the
:on the first line of conventional commits - Everything after the
:in a conventional commit footer
$details
Section titled “$details”Only a change file can have details, they’re any content after the title line.
$commit_author_name
Section titled “$commit_author_name”The name of the author of a conventional commit or the commit which introduced a change file.
Knope will skip templates containing this variable for change files that aren’t committed.
$commit_hash
Section titled “$commit_hash”The short hash of a conventional commit or the commit that introduced a change file.
Knope will skip templates containing this variable for change files that aren’t committed.
Variables referencing GitHub
Section titled “Variables referencing GitHub”Using any of these variables with Knope CLI requires configuring [github].
Knope will make GitHub API calls during PrepareRelease to resolve the variable.
If the GITHUB_TOKEN environment variable is not set, this will only work for public repositories
and will have a very low rate limit.
$pr_author_login Knope 0.23.0+
Section titled “$pr_author_login ”The GitHub username of the author of a conventional commit or the commit which introduced a change file.
$pr_number Knope 0.23.0+
Section titled “$pr_number ”The pull request number that introduced a conventional commit or a change file.