Set up code context for your site

Code context is available for Bitbucket Cloud and Github.

Who can do this?

Atlassian Cloud: Standard, Premium, Enterprise

Atlassian Government Cloud: Not available

HIPAA sites: Not available

Code context enables intelligent search across your connected source code repositories, directly within the Atlassian tools your team already uses. Whether you're navigating an unfamiliar codebase, investigating a bug, or asking an Rovo agent to help with a task, code context helps surface the right code faster.
Understand how code context works


Before you begin

There are a few things worth checking before enabling code context:

  1. Scan for secrets in your repositories. Code context indexes all content in opted-in repositories. If your repositories contain hardcoded API keys, passwords, tokens, or other sensitive data, that content will be indexed and discoverable by anyone with repository access. We recommend running a scan for secrets and changing any findings before enabling the feature.

  2. Check your data residency requirements. Data residency configuration isn't currently supported for code context. Indexed code and embeddings are stored and processed in the United States. If your organization has data residency or data sovereignty requirements outside the US, confirm that enabling code context is appropriate for your situation. Understand data residency

  3. Confirm indexing rights. Make sure your organization has the rights and approvals needed to allow Atlassian to mirror, index, and store your source code.

Rovo credit consumption coming soon

Using the search-code skill in Rovo Chat, Rovo Agents, the TWG CLI, and MCP will consume Rovo credits. Learn more about Rovo credits

Set up code context for Bitbucket Cloud

Disclaimers (Bitbucket only)

  • Automatic indexing and use. Rovo’s ability to answer natural language questions about your codebase is improved through semantic search indexes. When a paid Bitbucket workspace is connected to a Jira site with Rovo enabled (either at the time Rovo is activated or when a workspace is subsequently linked), Atlassian will automatically enable Code context and create a semantic search index of that workspace. Code changes are automatically indexed on an ongoing basis; updates may take up to 6 hours to reflect in search results.

  • Data handling and controls. Code context will not use your source code or indexes for model training. Searches will respect existing Bitbucket repository permissions. If used with a third-party coding agent, relevant source-code snippets may be transmitted to that provider and governed by its terms.

Prerequisite

Your Bitbucket workspace must be connected to a Jira site before we can index it. Refer to the following help document for more details: Connect Bitbucket Cloud to Jira Cloud | Bitbucket Cloud | Atlassian Support

Requesting Code context now

Our automatic rollout to Bitbucket customers will complete over the next two months. If you would like to request indexing, please follow these instructions:

  1. Go to Atlassian Administration. Select your organization if you have more than one.

  2. Select Rovo, then Code context.

  3. Select Enable code context.

Once enabled, your connected code will immediately start indexing. This can take up to 48 hours. The status of the initial index will be shown in your dashboard.

Set up code context for Github

Install GitHub for Atlassian and connect the GitHub organization

A Jira site administrator must install the GitHub for Atlassian app before Code context. Refer to the following help document for setup guidance with the most up-to-date installation flow: Connect GitHub Cloud to Jira | Atlassian Support

Grant only the repository access that matches your organization’s security and data-governance requirements. Code Context can index only repositories that the GitHub connection is permitted to access.

Grant access to Github organizations

To ensure that any private repositories are accessible by the Atlassian Cloud OAuth app, you need to grant access to your Github organization(s), if that has not already been done by a Github admin.

  1. To enable the Atlassian Cloud OAuth app, go to github.com/settings/applications.

  2. Select the Atlassian Cloud OAuth app, and then select the Grant button associated with the Github organization(s) you want to give the Atlassian Cloud OAuth app access to.

Once you have granted this access, you should see a green checkmark next to Full control of private repositories in Permissions.

Verify the connection

  1. In Jira, select Apps, and then select Manage your apps.

  2. Select GitHub for Atlassian.

  3. Confirm that the intended GitHub organization appears as connected.

  4. Confirm that the repository scope is correct.

Enable code context

Once the GitHub connection is established, an Atlassian organization admin can enable code context. To enable code context for your site:

  1. Go to Atlassian Administration. Select your organization if you have more than one.

  2. Select Rovo, then Code context.

  3. Select Enable code context.

  4. Select the site you’d like to set up with code context.

  5. Carefully review the terms to enable code context.

Once enabled, your connected code will immediately start indexing. This can take up to 48 hours. The status of the initial index will be shown in your dashboard.

You can disable code context at any time, and indexing will stop immediately. All stored embeddings, indices, and code chunks are deleted.

If you encounter any problems while installing code context, refresh and try again or refer to the troubleshooting section below.

Atlassian administration app, with the code context feature selected and enabled for Beaconstone Financial

Permissions and access

Code context is built to enforce permissions as a core principle, not an afterthought, and is especially designed to respect your Source Code Management (SCM) permissions. Code context doesn't grant users access beyond what their SCM permissions allow.

Users will see results only for repositories and branches they already have access to in the source SCM. Atlassian validates permissions at query time against the repository's permission endpoint.

If an organization admin enables code context for a repository, individual contributors cannot exclude their code from indexing. This is consistent with how existing Bitbucket lexical search already works.

The Teamwork Graph CLI augments Atlassian coding agents (via the Rovo CLI) or third-party products (like Claude Code or Codex).

If you use code context via the Teamwork Graph CLI with a third-party agent, your source code will be sent to those products and governed by their terms, which may expose proprietary code and IP.

You’re responsible for assessing the third-party providers security and suitability, for managing all their associated costs, API capacity, and agent actions.

We want to hear how code context is working for your team. Share feedback and report issues directly through the Rovo Chat, or this form if you’re using the TWG CLI

Troubleshooting GitHub access for code context

If Rovo returns no code results or only some of the code you expect, try disconnecting then reconnecting your GitHub account.

  • Issues during GitHub for Atlassian connection

Refer to the following support document for details on troubleshooting you Github connection: Connect GitHub Cloud to Jira | Atlassian Support

  • Not seeing expected search results

This could be caused by a few different things.

  1. Confirm that the user has access to that repository. Search results respect repository permissions, so if the user does not have access to that repository, no results will appear.

  2. If you’re looking for code in GitHub, verify that the corresponding repository was granted access during the GitHub for Atlassian connection phase. See the official documentation here on repository scopes. Code context will not index repositories that are not connected. Connect GitHub Cloud to Jira | Atlassian Support

  3. Confirm that the user has linked their GitHub or Bitbucket identity. This can be connected from Rovo Chat through the Data Sources.

  4. Confirm that indexing is complete for the connected repositories. The status of the initial index will be available in the AdminHub to administrators. The initial index can take up to 48 hours.

  5. Private repositories are not visible unless the Atlassian Cloud OAuth app is enabled by a Github admin and proper permissions are granted.

    1. To enable the Atlassian Cloud OAuth app, go to github.com/settings/applications, select the Atlassian Cloud OAuth app, and then select the Grant button associated with the Github organization(s) you want to give the Atlassian Cloud OAuth app access to. Once you have granted this access, you should see a green checkmark next to Full control of private repositories in Permissions.

GitHub access for code context

If Rovo returns no code results or only some of the code you expect, try disconnecting then reconnecting your GitHub account.

Disconnect GitHub

To disconnect your account:

  1. Go to Manage connected apps.

  2. Find Atlassian then GitHub.

  3. Select Remove.

Reconnect GitHub

To reconnect your account:

  1. Follow the steps to Connect to external apps | Rovo | Atlassian Support to connect GitHub.

  2. Use the GitHub account that has access to the repositories you want to search.

  3. Wait up to 15 minutes, then try your code context search again.

Still need help?

The Atlassian Community is here for you.