Skip to main content

Bitbucket Integration

Connect Bitbucket Cloud to enable the AI agent to create branches, push commits, and open pull requests in your repositories.

note

Integration settings are only visible to users with the Admin role. Regular users cannot access or modify integration configuration.

Connecting via OAuth

  1. Navigate to Settings → Integrations → Bitbucket
  2. Click Connect with OAuth
  3. A popup window opens to Bitbucket's OAuth authorization screen
  4. Grant Clears AI access to your Bitbucket Cloud account
  5. The popup closes and the connection status updates

Once connected, the integration card displays your workspace name and connection timestamp.

Workspace Configuration

After connecting via OAuth, you need to configure your Bitbucket workspace before repositories can be listed.

  1. In the Repositories section, find the Workspace slug field
  2. Enter your workspace slug — the first path segment of your repository URLs (e.g., for bitbucket.org/clearsai/my-repo, the workspace slug is clearsai)
  3. Click Save

Once the workspace is saved, the repository list populates automatically. You can update the workspace slug at any time to switch between workspaces.

Repositories

After configuring your workspace, a table displays all accessible repositories with their name, description, and default branch.

Click Refresh to reload the repository list from Bitbucket if you've recently added new repositories to your workspace.

Watching Repositories

Each repository row has a Watch toggle. Toggle Watch on to register a Clears webhook for monitoring pull requests, pushes, and build status events on that repository.

tip

If webhook registration is not yet available, the Watch toggle will be disabled with a tooltip explaining that backend support is pending.

Execution Repositories

Select which repositories the AI agent can work in:

  1. Open the Execution Repositories section
  2. Use the multi-select dropdown to choose repositories from your workspace
  3. Click Save to apply changes, or Discard to revert unsaved selections

Only repositories selected here appear as options when creating stories on the Board. The AI agent cannot access repositories that are not selected as execution repositories.

Webhook Management

Clears AI manages webhooks on your Bitbucket repositories. When you toggle Watch on for a repository, a webhook is registered to receive events for:

  • Pull request updates
  • Push events
  • Build status changes (commit statuses)

The webhook status is displayed per-repository in the repository table. Webhooks are automatically removed when you toggle Watch off.

Disconnecting

Click Disconnect to revoke the OAuth connection. This removes Clears AI's access to your Bitbucket workspace and all registered webhooks.