# Triagic + Bitbucket: ticket investigations over your repositories, read-only

> Bitbucket in Triagic: Read repositories, pull requests, commits, pipelines and issues in Bitbucket Cloud. Read-only, with a credential you configure.

Source: https://triagic.com/integrations/bitbucket

## What you can ask

- In Bitbucket, which merged change touched the export job in the last two weeks?
- Find the Bitbucket pull request that introduced the 240 MB file limit
- Is there an open Bitbucket issue for the OOM on large CSV imports? Link it.
- Who last changed migrations/0142.sql in Bitbucket, and was it reviewed?
- List Bitbucket deploy keys and outside collaborators on the private repositories

## What the agent can do

- `bb_get_repository`
- `bb_list_repositories`
- `bb_list_workspaces`
- `bb_get_pull_requests`
- `bb_get_pull_request`
- `bb_get_pull_request_comments`
- `bb_get_pull_request_comment`
- `bb_get_comment_thread`
- `bb_get_pull_request_activity`
- `bb_get_pull_request_diff`
- `bb_get_pull_request_diffstat`
- `bb_get_diff`
- `bb_get_diffstat`
- `bb_get_pr_commits`
- `bb_get_pr_statuses`
- `bb_get_commit`
- `bb_get_commit_statuses`
- `bb_get_merge_base`
- `bb_get_file_history`
- `bb_get_tags`
- `bb_get_tag`
- `bb_get_branch`
- `bb_list_pipelines`
- `bb_get_pipeline`
- `bb_get_pipeline_steps`
- `bb_get_pipeline_step_log`
- `bb_get_issues`
- `bb_get_issue`
- `bb_get_commits`
- `bb_get_branches`
- `bb_get_file_content`
- `bb_browse_repository`
- `bb_get_user`
- `bb_get_current_user`
- `bb_search_repositories`
- `bb_search_code`
- `bb_get_workspace`
- `bb_get_context`

## Connect in three steps

1. **Mint a read-only credential in Bitbucket.** Create a dedicated user or token that can only read. The server only ever sends GET requests and has no write tools, and the API token carries only read scopes.
2. **Add it in the Triagic portal.** Integrations, then Add shared data source, then Bitbucket. Fill in: Atlassian account email (required): The email you sign in to Atlassian with, not your Bitbucket username.; API token (required): id.atlassian.com → Security → Create API token with scopes → Bitbucket. Give it only read scopes: account (read:user), workspace, project, repository, pull request, pipeline and issue. App passwords no longer work.
3. **Let a desktop pick it up.** Saving validates the shape of what you typed. The first desktop app to sync starts Bitbucket locally and reports running or degraded with the error text.

Setup reference: https://triagic.com/docs/integrations/code#bitbucket

## Read-only, by construction

The server only ever sends GET requests and has no write tools, and the API token carries only read scopes.

## FAQ

**Can Triagic change anything in Bitbucket?**
No. The server only ever sends GET requests and has no write tools, and the API token carries only read scopes. Give it a read-only credential as well, so the guarantee does not rest on one layer.

**What do I need to connect Bitbucket?**
Atlassian account email, API token. The desktop app on a member's machine starts the connection; the portal never holds a live process.

**Does Bitbucket cost extra?**
No. Every connector is included in the seat price. Start a 14-day trial without a card.

## Related integrations

- [GitHub](https://triagic.com/integrations/github)
- [GitLab](https://triagic.com/integrations/gitlab)
- [Azure DevOps](https://triagic.com/integrations/azure-devops)
- [CircleCI](https://triagic.com/integrations/circleci)
