In this page
Step 1: Define your target
Step 2: Get started with the Cloud version
Step 3: Migrate your commit policies
Migrate the commit policy for a repository
Server/Data Center to Cloud settings mapping
Step 4: Explore new features
Step-by-step guide
This section provides a step-by-step guide to help you migrate your Better Commit Policy for Jira configuration from Server/Data Center to the Cloud version.
It assumes that you already understand the differences between the source and target versions. It also assumes that you have administrator access to both.
Step 1: Define your target
Before you begin the migration, define the target configuration you want to achieve in the cloud. This clarity will guide your decisions and ensure each migration step moves you toward the intended end state.
As part of this definition, plan how you want to check the changes in your repositories. Then define your conditions (requirements for commit message format, links to work items, etc.), rejection messages, and when to skip checks.
Steps:
- Review the cloud documentation. In particular, get familiar with the configuration options available in the Cloud version.
- Analyze your current Server/Data Center commit policies. (You can also use this migration as an opportunity to review and improve your developer workflows.)
-
Plan your cloud migration in theory, without making changes yet:
- Define how to convert your current Server/Data Center commit policies to the .commitpolicy.yml configuration file used in the Cloud version.
- Check out the tutorials for extra guidance.
Step 2: Get started with the Cloud version
Install the Cloud version of the app and verify it works correctly with the defaults before migrating custom configurations.
Steps:
- Install the Cloud version.
- Follow the getting started guide.
- Don't proceed until the app works with the defaults (in at least one repository).
Step 3: Migrate your commit policies
In the Server/Data Center version, commit policies are defined once and multiple repositories can use the same shared configuration. In the Cloud version, commit policies follow an "x-as-code" model, where each repository has its own .commitpolicy.yml configuration file.
Because of this, you can migrate repositories one by one, rather than all at once, allowing you to transition gradually at your own pace.
Migrate the commit policy for a repository
This section guides you through migrating the commit policy for a single repository. It assumes the repository has already been migrated to the Cloud.
It is essentially about adding the .commitpolicy.yml configuration file to the Cloud repository, which implements a commit policy equivalent to your Server/Data Center policy. Important: you only need to do this for your blessed repositories, as forks and local clones will automatically receive the file at their next sync.
Steps:
-
Find your VCS connection ID (you'll need this later):
- Open your Jira Cloud site (in a browser tab).
- On the Jira interface, go to Apps (in the left-bar) → Better Commit Policy.
- In the Connected VCS workspaces box, find your Bitbucket Cloud workspace.
- Click the icon to copy the connection ID to the clipboard.
- Close the tab.
-
Add the policy configuration file in Bitbucket Cloud:
- Open your Bitbucket Cloud workspace (in another browser tab).
- Navigate to the repository, open Source.
- Click the "..." button → Add file.
- Enter .commitpolicy.yml as filename.
-
Copy this to the file content (but don't commit it yet!):
commit-policy: name: "..." description: "..." vcs-connection: id: "..." commit: # ... migrate commit conditions over here pull-request: # ... migrate branch conditions for pull request source and destination branches here setting: # ... migrate global settings over here
- At line 5, replace "..." with the VCS connection ID with the value you just copied to your clipboard. (Be sure to preserve the brackets!)
-
Migrate the commit policy settings to the configuration file:
- Open the Server/Data Center commit policy for editing (in another browser tab). If you don't have write permission, viewing it in read-only mode is sufficient. Keep it open as a reference while you create the equivalent settings in the Cloud.
- At line 2, replace "..." with the name copied from the Server/Data Center commit policy.
- At line 3, replace "..." with the description copied similarly.
- Configure the fields in the commit:, pull-request: and setting: sections to match your Server/Data Center settings. As there isn't always a direct one-to-one match, we compiled a mapping table to help. If you can't or don't want to migrate something, just skip it. It can be added any time later.
- Commit it.
- Close the tab.
- In the repository, open Commit policy.
- The Commit policy screen will display the parameters. (In case of validation errors, see the troubleshooting guide).
- Make sure that the "Commit Policy Satisfied" custom merge check is enabled in this repository.
-
Test the migration by viewing the merge check results for two pull requests:
- Negative test: find a pull request with an incorrect title or problematic commits, and verify that the merge check reports an “N violations” status.
- Positive test: find a clean pull request with no problems, and verify that the merge check reports a “Satisfied” status.
- You're done!
Server/Data Center to Cloud settings mapping
The table below shows how Server/Data Center settings correspond to Cloud configuration fields, helping you set up an equivalent commit policy. For all available options, including additional Cloud-only settings, see the Configuration reference.
Step 4: Explore new features
Embrace the full potential of the Cloud version with the new cloud-only app features:
- Pull request merge checks (with detailed results)
- Pull request conditions (title, description, source and destination branches)
- Dry run (encourage the policy without enforcing it)
- Recipes (a large library of common conventions)
- Merge checks at workspace, project, and repository levels (three scopes)
Questions?
Ask us any time.