Automation basics
Understand the general concepts and best practices of automation in Atlassian Cloud products.
The following smart values are available to access and format development information from a connected source code management tool.
Check out some common DevOps automation rules where you can use these smart values. Go to templates.
Connect your source code management, build or deployment tool to use these smart values.
Learn how to integrate your source code management tool with Jira Cloud
Visit the marketplace to integrate your build or deployment tool with Jira Cloud
A branch represents an independent line of development.
These smart values are only available for the Branch created development trigger.
The name of the branch.
{{branch.name}} returns TEST-123-some-feature
The absolute URL of the branch.
{{branch.url}} returns https://bitbucket.org/account/repo/TEST-123-some-feature
The repository the branch belongs to.
Note that repository contains additional nested smart values.
{{branch.repository}} returns https://bitbucket.org/account/repo/TEST-123-some-feature
{{branch.repository.url}} returns https://bitbucket.org/account/repo/TEST-123-some-feature
Note that this will return an encoded URL; everything after bitbucket.org/ will look different from what you see here.
A commit represents an individual change to a file (or set of files).
These smart values are only available for the Commit created development trigger.
The SHA1 hash of the commit.
{{commit.hash}} returns 4877576951f3eda43625d3345058e702dad3df0d
The truncated SHA1 hash of the commit. (7 length char)
{{commit.shortHash}} returns 4877576
The commit message.
{{commit.message}} returns awesome commit handles everything
The absolute URL of the commit.
{{commit.url}} returns https://bitbucket.org/commit/121212
True if commit is a merge commit.
{{commit.isMergeCommit}} returns true or false
The timestamp (UTC) the commit was created. This value supports Date and Time functions.
{{commit.timestamp}} returns 2020-07-20T07:00:00.0+0000
The repository the commit was made in. Note that repository contains additional nested smart values.
{{commit.repository}} returns my-awesome-repository
{{commit.repository.url}} returns pullRequest
A pull request represents proposed changes before they are integrated into an official project.
These smart values are only available for the Pull request created, Pull request declined and Pull request merged triggers. Learn more about automation triggers.
The title of the pull request.
{{pullRequest.title}} returns ISSUE-12: Fix bugs
The absolute URL of the pull request.
{{pullRequest.url}} returns https://bitbucket.org/pull-request/182
The state the pull request is in.
{{pullRequest.state}} returns Open, Merged, or Declined
The time (UTC) when the pull request was created. This value supports Date and Time functions. This value is only available for the pull request created trigger.
{{pullRequest.createdDate}} returns 2020-07-20T07:00:00.0+0000
The time (UTC) when the pull request was last updated (created, declined or merged). This value supports Date and Time functions. This value is available for all pull request triggers.
{{pullRequest.updatedDate}} returns 2020-07-20T07:00:00.0+0000
Source branch for the pull request. This value may be unavailable for cross-repo pull requests.
Note that sourceBranch contains additional nested smart values. However, the repository values are not available for the pull request source branch.
{{pullRequest.sourceBranch}} returns TEST-123-some-feature
{{pullRequest.sourceBranch.url}} returns https://bitbucket.org/account/repo/TEST-123-some-feature
Destination branch for the pull request. Note that destinationBranch contains additional nested smart values.
{{pullRequest.destinationBranch}} returns master
{{pullRequest.destinationBranch.url}} returns https://bitbucket.org/account/repo/TEST-123-some-feature
{{pullRequest.destinationBranch.repository}} returns https://bitbucket.org/account/repo/TEST-123-some-feature
A build represents the process in which files are converted into their final consumable form.
These smart values are only available for the Build successful, Build failed and Build status changed development triggers. Learn more about automation triggers.
Destination branch for the pull request. Note that destinationBranch contains additional nested smart values.
{{build.name}} returns build#123
The absolute URL of the build.
{{build.url}} returns https://bitbucket.org/{7faf7dee-a29b-4faa-bbc2-d7128a6d3278}/{315a3ecb-1f18-4953-98ae-5890f93073b5}/addon/pipelines/home#!/results/7
The state of the build.
An enum of possible states: pending, in_progress, successful, failed, cancelled, unknown
{{build.state}} returns in_progress
Refs of the build. This is a list of metadata that can be associated with a build. It may contain, for example, branches and tags names.
This value is optional and may be an empty list.
{{build.refs}} returns [feature/ISSUE-123-some-work, feature/ISSUE-456-more-work]
A deployment represents the process in which a product is released in an environment.
These smart values are only available for the Deployment successful, Deployment failed and Deployment status changed development triggers. Learn more about automation triggers.
A human-friendly deployment name.
{{deployment.name}} returns 7
The absolute URL of the deployment.
{{deployment.url}} returns https://bitbucket.org/{6d6d87be-bdc2-42b5-ad8f-85cb915abc38}/{80c30dd6-2d2f-401c-ac33-8317adbc509d}/addon/pipelines/deployments#!/deployments/{888ba48c-0011-5a46-9d59-8da313851383}
The state of the deployment.
An enum of possible states: pending, in_progress, successful, failed, cancelled, rolled_back, unknown.
{{deployment.state}} returns in_progress
Smart values for the deployment environment. Note that environment contains additional nested smart values.
{{deployment.environment}} returns my-custom-prod-env
{{deployment.environment.type}} returns production
A repository represents a collection of files and associated metadata. These smart values can only be accessed through other root keys (e.g. {{branch.repository}}).
The name of the repository.
{{repository.name}} returns TEST-123-some-feature
The absolute URL of the repository.
{{repository.url}} returns https://bitbucket.org/account/repo
Note that this will return an encoded URL; everything after bitbucket.org/ will look different from what you see here
An environment represents a distinct ecosystem where products are deployed to. These smart values can only be accessed through other root keys (e.g{{deployment.environment}}).
The user provided name for the environment.
{{environment.name}} returns my-custom-prod-env
The environment type.
An enum of possible states: production, staging, testing, development, unknown
{{environment.type}} returns production
Was this helpful?