Tentacle goes beyond just displaying static links. It also supports the use of dynamic variables that can be resolved based on the current context, such as the pull request or the repository.

For example, you can define a link that will take the user directly to a preview environment for the current pull request by using the $pullrequest.number variable. Tentacle will automatically substitute this variable with the actual pull request number, creating a personalized link for each pull request.

Pull Request context

VariableTypeDescription
$pullrequest.jira_prefixstringThe Jira prefix of the pull request obtained from the branch name or pull request title. Links using this variable will be automatically hidden if the prefix is not found.
$pullrequest.numberstringThe number of the pull request
$pullrequest.titlestringThe title of the pull request
$pullrequest.authorstringThe author of the pull request
$pullrequest.basestringThe base branch of the pull request
$pullrequest.headstringThe head branch of the pull request
$pullrequest.changed_filesnumberThe number of changed files in the pull request
$pullrequest.commitsnumberThe number of commits in the pull request
$pullrequest.statestringThe state of the pull request. Either open or closed.
$pullrequest.deletionsnumberThe number of deletions in the pull request
$pullrequest.additionsnumberThe number of additions in the pull request

Repository context

VariableTypeDescription
$repository.namestringThe name of the repository without the .git extension.
$repository.ownerstringThe account owner of the repository.
$repository.full_namestringThe full name of the repository. For example octocat/Hello-World
$repository.html_urlstringThe html url of the repository. For example https://github.com/octocat/Hello-World
$repository.default_branchstringThe default branch of the repository
$repository.archivedbooleanThe archived status of the repository
$repository.is_templatebooleanThe template status of the repository
$repository.visibilitystringThe visibility of the repository. Can be one of: public, private