Getting Started
Variables
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
Variable | Type | Description |
---|---|---|
$pullrequest.jira_prefix | string | The 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.number | string | The number of the pull request |
$pullrequest.title | string | The title of the pull request |
$pullrequest.author | string | The author of the pull request |
$pullrequest.base | string | The base branch of the pull request |
$pullrequest.head | string | The head branch of the pull request |
$pullrequest.changed_files | number | The number of changed files in the pull request |
$pullrequest.commits | number | The number of commits in the pull request |
$pullrequest.state | string | The state of the pull request. Either open or closed . |
$pullrequest.deletions | number | The number of deletions in the pull request |
$pullrequest.additions | number | The number of additions in the pull request |
Repository context
Variable | Type | Description |
---|---|---|
$repository.name | string | The name of the repository without the .git extension. |
$repository.owner | string | The account owner of the repository. |
$repository.full_name | string | The full name of the repository. For example octocat/Hello-World |
$repository.html_url | string | The html url of the repository. For example https://github.com/octocat/Hello-World |
$repository.default_branch | string | The default branch of the repository |
$repository.archived | boolean | The archived status of the repository |
$repository.is_template | boolean | The template status of the repository |
$repository.visibility | string | The visibility of the repository. Can be one of: public , private |