Skip to content

Bitbucket

The Bitbucket Datasource lets you connect a Bitbucket Cloud repository to Cognipeer. Cognipeer indexes all text-based files in the repository so your Peer can answer questions about your code, architecture, and documentation stored in Bitbucket.


Use Cases

  • Search and explain code stored in Bitbucket.
  • Index repository documentation (Markdown wikis, READMEs, design docs).
  • Support developer onboarding with an AI assistant that knows your codebase.
  • Combine with Jira Tool integration for a complete development workflow assistant.

Prerequisites

  • A Bitbucket App Password with Repositories: Read permission.
    Create one at Bitbucket Settings → App Passwords.
  • Your Bitbucket workspace (team or username) and repository slug.
  • The branch you want to index (default: main).

Setting Up a Bitbucket Datasource

  1. Navigate to Datasources and click Add Datasource.
  2. Select Bitbucket as the datasource type.
  3. Fill in:
    • Workspace: Your Bitbucket workspace slug (e.g., my-team).
    • Repository: Repository slug (e.g., my-repo).
    • Username: Your Bitbucket username.
    • App Password: The App Password you created.
    • Reference (optional): Branch to index (defaults to main).
  4. Click Save.
  5. Click Sync to start indexing.

What Gets Indexed

Cognipeer uses the Bitbucket REST API to walk the full repository tree and fetch individual file contents. All text-based files are indexed (up to 5,000 files). Binary files are automatically excluded.


Keeping the Datasource Up to Date

Bitbucket datasources do not auto-sync. Trigger a manual sync:

  • Click Sync in the datasource settings after pushing updates.
  • For automated sync workflows from Bitbucket Pipelines, use the Developer Hub.

Best Practices

  • Use descriptive file and folder names to improve retrieval quality.
  • For monorepos, consider creating separate datasources per service or package directory.
  • Rotate App Passwords periodically and update the datasource credentials.

Limitations

  • Maximum 5,000 files per sync.
  • Only text-based files are indexed.
  • Requires a valid, non-expired App Password.

Studio · Pulse — Cognipeer product documentation