Skip to main content

Bitbucket

Comprehensive Bitbucket connector for managing repositories, pull requests, issues, pipelines, branches, commits, and webhooks through the Bitbucket Cloud API v2.0.

Categories: Version Control, DevOps, CI/CD, Code Collaboration

What you can ask​

  • List open pull requests in the acme/api repo that haven't had a review in 3 days.
  • Open a pull request from feature/auth into main with the commit log as the body.
  • Find every repo with no commits in the last 90 days for archive review.

Set up​

Bitbucket needs an OAuth application from your organization before anyone can connect. An organization admin completes these steps once.

  1. Go to Organization > Connectors and find Bitbucket. Click Enable, and choose which tools to allow.
  2. Create an OAuth application in the Bitbucket developer portal.
  3. Add the Redirect URI shown in the connector settings to the application.
  4. Copy the application's Client ID and Client Secret into the connector, then save it.
  5. Each member connects their own account the first time they use it.

⚠️ Warning: Do not enter your Devs.ai or Bitbucket login email or password in the OAuth application fields.

To use one account for the whole organization, turn on Share one connection with everyone. Every member's agents then act as that account, with exactly the access it has.

OAuth scopes used by these tools (8)

Grant the scopes for the tools you plan to allow.

  • account
  • pipeline
  • pipeline:write
  • pullrequest
  • pullrequest:write
  • repository
  • repository:write
  • webhook

Tools​

Bitbucket offers 54 tools. Admins choose which ones agents can use. See Tool permission groups.

Read (33)​

View and search information without changing it.

ToolWhat it does
get_branchGet branch details by name
get_commitGet commit details by hash
get_commit_diffGet commit diff
get_current_userGet authenticated user profile
get_default_branchGet repository default branch
get_pipelineGet pipeline details by UUID
get_pipeline_stepGet pipeline step details
get_pipeline_step_logGet pipeline step logs
get_pullrequestGet pull request details by ID
get_pullrequest_activityGet pull request activity log
get_pullrequest_diffGet pull request diff
get_repositoryGet repository details by slug
get_webhookGet webhook details by UUID
get_workspaceGet workspace details
list_branchesList repository branches
list_commit_commentsList commit comments
list_commit_statusesList commit build statuses
list_commitsList repository commits with filters
list_pipeline_stepsList pipeline steps
list_pipeline_variablesList pipeline variables
list_pipelinesList repository pipelines
list_pullrequest_commentsList pull request comments
list_pullrequest_commitsList pull request commits
list_pullrequest_statusesList pull request build statuses
list_pullrequestsList pull requests with filtering options
list_repositoriesList repositories in a workspace with pagination
list_repository_forksList repository forks
list_repository_watchersList repository watchers
list_user_emailsList user email addresses
list_webhooksList repository webhooks
list_workspace_membersList workspace members
list_workspacesList accessible workspaces
validate_credentialValidate Bitbucket credentials.

Write (7)​

Create or send data.

ToolWhat it does
create_branchCreate a new branch
create_pullrequestCreate a new pull request
create_pullrequest_commentAdd a comment to a pull request
create_repositoryCreate a new repository in a workspace
create_webhookCreate a repository webhook
fork_repositoryFork a repository
trigger_pipelineTrigger a new pipeline run

Delete or overwrite (14)​

Remove or replace existing data.

ToolWhat it does
approve_commitApprove a commit
approve_pullrequestApprove a pull request
decline_pullrequestDecline a pull request
delete_branchDelete a branch
delete_repositoryDelete repository permanently
delete_webhookDelete webhook permanently
merge_pullrequestMerge a pull request
request_pullrequest_changesRequest changes on a pull request
stop_pipelineStop a running pipeline
unapprove_commitRemove commit approval
unapprove_pullrequestRemove approval from a pull request
update_pullrequestUpdate pull request details
update_repositoryUpdate repository settings
update_webhookUpdate webhook configuration
⌘J