Template Fields
Template Fields
In order to provide flexible configuration, Renovate supports using "templates" for certain fields like branchName
.
Renovate's templates use handlebars under the hood. You can recognize templates when you see strings like {{depName}}
in configuration fields.
Below you can find lists of fields/values that you can use in templates. Some are configuration options passed through, while others are generated as part of Renovate's run.
Exposed Config Options
The following configuration options are passed through for templating: branchName, branchPrefix, branchTopic, commitMessage, commitMessageAction, commitMessageExtra, commitMessagePrefix, commitMessageSuffix, commitMessageTopic, group, groupSlug, groupName, managerBranchPrefix, prBodyColumns, prBodyDefinitions, prBodyNotes, prTitle.
Other Available Fields
The following runtime values are passed through for templating:
baseDir
: The full directory with path that the dependency has been found inbody
: The body of the release notescurrentValue
: The extracted current value of the dependency being updatedcurrentVersion
: The current version that is being updateddatasource
: The datasource used to look up the upgradedepName
: The name of the dependency being updateddepNameLinked
: The dependency name already linked to its home page using markdowndepNameSanitized
: The depName field sanitized for use in branches after removing spaces and special charactersdepNameShort
: Shortened depNamedepType
: The dependency type (if extracted - manager-dependent)displayFrom
: The current value, formatted for displaydisplayTo
: The to value, formatted for displayfromVersion
: The version that would be currently installed. For example, if currentValue is ^3.0.0 then currentVersion might be 3.1.0.hasReleaseNotes
: true if the upgrade has release notesisLockfileUpdate
: true if the branch is a lock file updateisMajor
: true if the upgrade is majorisPatch
: true if the upgrade is a patch upgradeisRange
: true if the new value is a rangeisSingleVersion
: true if the upgrade is to a single version rather than a rangelogJSON
: ChangeLogResult object for the upgradelookupName
: The full name that was used to look up the dependency.newDigest
: The new digest valuenewDigestShort
: A shorted version of newDigest, for use when the full digest is too long to be conveniently displayednewMajor
: The major version of the new version. e.g. "3" if the new version if "3.1.0"newMinor
: The minor version of the new version. e.g. "1" if the new version if "3.1.0"newValue
: The new value in the upgrade. Can be a range or version e.g. "^3.0.0" or "3.1.0"newVersion
: The new version in the upgrade.packageFile
: The filename that the dependency was found inparentDir
: The name of the directory that the dependency was found in, without full pathplatform
: VCS platform in use, e.g. "github", "gitlab", etc.project
: ChangeLogProject objectrecreateClosed
: If true, this PR will be recreated if closedreferences
: A list of references for the upgradereleases
: An array of releases for an upgradereleaseNotes
: A ChangeLogNotes object for the releaserepository
: The current repositorytoVersion
: The new version in the upgrade, e.g. "3.1.0"updateType
: One of digest, pin, rollback, patch, minor, majorupgrades
: An array of upgrade objects in the branchurl
: The url of the release notesversion
: The version number of the changelogversions
: An array of ChangeLogRelease objects in the upgrade