Template Context
The template context contains all the data available to your templates. This page documents the structure of the context and all available variables.Release Context
Each time thebody template is rendered, it receives a release context:
The release version (e.g.,
v1.0.0). null for unreleased changes.The annotated tag message for the release.
The commit ID of the release commit (e.g.,
a440c6eb26404be4877b7e3ad592bfaa5d4eb210).Unix timestamp of the release (e.g.,
1625169301).Usage:Path to the Git repository (e.g.,
/path/to/repository).Array of commit objects in this release. See Commit Object below.
Range of commits in this release.
Information about the previous release.
Release statistics. See Statistics Object below.
Commit Object
The structure of a commit depends on whetherconventional_commits is enabled.
With Conventional Commits
Whenconventional_commits = true:
Full commit SHA (e.g.,
e795460c9bb7275294d1fa53a9d73258fb51eb10).Commit group assigned by
commit_parsers (e.g., Features, Bug Fixes).Commit scope from conventional commit format (e.g.,
api, auth).Example: For feat(api): add endpoint, scope is api.Commit description (the text after the type and scope).Example: For
feat(api): add endpoint, message is add endpoint.Commit body (text between description and footers).
Array of footer objects. See Footers below.
true if commit is a breaking change.Set by:- Exclamation mark:
feat!: breaking change - Footer:
BREAKING CHANGE: description
Description of the breaking change from
BREAKING CHANGE footer or commit message.true if commit follows conventional commits format.true if commit is a merge commit.Array of link objects extracted by
link_parsers.Commit author information.
Commit committer information (same structure as
author).The author is who originally wrote the code. The committer is who applied the commit. These differ when applying patches or merging pull requests.
Full, unprocessed commit message.
Without Conventional Commits
Whenconventional_commits = false:
Full commit SHA.
Commit group (assigned by
commit_parsers).Commit scope (can be set by
commit_parsers).Full commit message (not parsed into parts).
Always
false.true if commit is a merge commit.Array of link objects (same as conventional mode).
Commit author information.
Commit committer information.
Full commit message (same as
message in this mode).Footers
Conventional commits can contain structured footers:Footer name (e.g.,
Signed-off-by, BREAKING CHANGE).Separator between token and value (
: or #).Footer value (text after the separator).
true if this is a BREAKING CHANGE footer.Statistics Object
Thestatistics object provides release metrics:
Total number of commits in the release.
Number of days between the first and last commit.
Number of commits following conventional commits format.
Aggregated links from all commits with occurrence counts.
Days between this release and the previous release.
Remote Context
When using remote integrations (GitHub, GitLab, etc.), additional context is available:GitHub integration context.Usage:
GitHub contributor information (when GitHub integration is enabled).Template example:
Footer Context (releases array)
Thefooter template has access to the releases array containing all releases: