# Bitbucket integration

> Bitbucket Cloud Git hosting platform — manage repositories, pull requests, issues, pipelines, and webhooks via the REST API v2.0.

- Authentication: oauth2

## Tools (89)

- **Add Default Reviewer**: Add a user as a default reviewer on a repository.
- **Approve Commit**: Approve a commit as the authenticated user.
- **Approve Pull Request**: Approve a pull request as the authenticated user.
- **Build Commit Status**: Create or update a build status on a commit (used for CI integrations).
- **Create Branch**: Create a new branch from a given commit hash or existing ref.
- **Create Branch Restriction**: Add a branch-permission rule (e.g. require approvals, prevent force-push) to a repository.
- **Create Commit**: Commit one or more file changes (create, update, or delete) to a branch.
- **Create Commit Comment**: Add a comment to a commit (general or inline on a file line).
- **Create Deploy Key**: Add an SSH deploy key to a repository.
- **Create Issue**: Create a new issue in a repository (issues must be enabled).
- **Create Issue Comment**: Add a comment to an issue.
- **Create Pipeline Variable**: Add a new repository-level Pipelines variable.
- **Create Project**: Create a project within a workspace.
- **Create Pull Request**: Create a pull request between two branches (or across forks).
- **Create Pull Request Comment**: Add a comment to a pull request (general, inline, or reply).
- **Create Pull Request Task**: Add a checklist task to a pull request.
- **Create Repository**: Create a new Git repository in a workspace.
- **Create Repository Webhook**: Register a webhook on a repository for events like pushes, PRs, or comments.
- **Create Snippet**: Create a new snippet with one or more files.
- **Create Tag**: Create a lightweight or annotated Git tag pointing at a commit.
- **Decline Pull Request**: Mark a pull request as DECLINED (cannot be re-opened).
- **Delete Branch**: Permanently delete a branch (returns 204).
- **Delete Branch Restriction**: Delete a branch restriction by ID.
- **Delete Issue**: Permanently delete an issue (prefer closing/resolving via Update Issue).
- **Delete Pull Request Comment**: Soft-delete a PR comment owned by the authenticated user.
- **Delete Repository**: Permanently delete a repository (no undo).
- **Delete Repository Webhook**: Remove a repository webhook subscription.
- **Delete Snippet**: Permanently delete a snippet.
- **Fork Repository**: Fork a repository into a target workspace.
- **Get Branch**: Fetch a single branch's metadata and tip commit.
- **Get Branch Restriction**: Fetch a single branch restriction by ID.
- **Get Commit**: Fetch a commit's author, date, message, parents, and HAL links.
- **Get Commit Diff**: Get the raw unified diff of a commit against its first parent.
- **Get Current User**: Fetch the connected user's profile (uuid, account_id, display_name).
- **Get Current User Email Addresses**: List the authenticated user's email addresses (with primary/confirmed flags).
- **Get File or Directory Contents**: Read the raw bytes of a file or list a directory at a commit/branch/tag.
- **Get Issue**: Fetch one issue's full details.
- **Get Pipeline**: Fetch a pipeline run's current state and result.
- **Get Pipeline Step Log**: Read the raw build log (text/plain) for a single pipeline step.
- **Get Project**: Fetch one project's metadata.
- **Get Pull Request**: Fetch a single pull request's full details (state, branches, reviewers, links).
- **Get Pull Request Diff**: Read a PR's diff as raw unified-diff text (use diffstat for structured summary).
- **Get Pull Request Diffstat**: Get the structured file-by-file change summary (added/removed lines, status) for a pull request.
- **Get Repository**: Fetch full repository metadata (mainbranch, project, fork policy, links).
- **Get Snippet**: Fetch a snippet's metadata and file list.
- **Get Workspace**: Fetch one workspace's metadata.
- **List Branches**: List branches in a repository (each includes its tip commit).
- **List Branch Restrictions**: List the branch-permission rules (merge checks, push restrictions) on a repository.
- **List Commit Comments**: List comments left on a specific commit.
- **List Commits**: List commits starting from a branch, tag, or SHA (or the main branch by default).
- **List Commit Statuses**: List all build statuses attached to a commit (across CI systems).
- **List Default Reviewers**: List the repository's default reviewers, added automatically to new pull requests.
- **List Deploy Keys**: List SSH deploy keys configured on a repository.
- **List Issue Comments**: List comments on an issue.
- **List Issues**: List issues in a repository (requires issue tracker enabled). Supports BBQL filtering.
- **List Pipelines**: List pipeline runs in a repository (trailing slash required on the path).
- **List Pipeline Steps**: List the ordered steps inside a pipeline run (trailing slash required).
- **List Pipeline Variables**: List repository-scoped Pipelines variables (secured values are masked).
- **List Projects in Workspace**: List the projects (repository groupings) within a workspace.
- **List Pull Request Activity**: List the activity log for a pull request: approvals, updates, comments, and merges.
- **List Pull Request Comments**: List all comments on a PR (general, inline, or threaded replies).
- **List Pull Request Commits**: List the commits a PR is asking to merge (source minus destination).
- **List Pull Requests**: List pull requests in a repository (defaults to OPEN only; pagelen max is 50).
- **List Pull Request Statuses**: List commit build statuses (CI results) attached to the pull request's commits.
- **List Pull Request Tasks**: List the checklist tasks attached to a pull request.
- **List Repositories in Workspace**: List repositories the user can access in a workspace; supports BBQL filtering.
- **List Repository Downloads**: List the download artifacts uploaded to a repository.
- **List Repository Permissions for User**: List the effective repository permissions granted to workspace members.
- **List Repository Watchers**: List users watching a repository.
- **List Repository Webhooks**: List webhook subscriptions registered on a repository.
- **List Snippets**: List snippets the authenticated user owns or can access.
- **List Tags**: List the repository's tags (each includes its target commit).
- **List Workspace Members**: List a workspace's members (use to find user UUIDs for reviewers/assignees).
- **List Workspaces**: List workspaces the connected user belongs to (use the slug or uuid as the path segment elsewhere).
- **Merge Pull Request**: Merge a PR into its destination branch (optionally async with 202 + task polling).
- **Remove Default Reviewer**: Remove a user from a repository's default reviewers.
- **Request Changes on Pull Request**: Record a "changes requested" review on a PR. Clear it by issuing DELETE on the same endpoint.
- **Stop Pipeline**: Stop a running pipeline (final result becomes STOPPED).
- **Trigger Pipeline**: Start a new pipeline run targeting a branch, tag, or commit (trailing slash required).
- **Unapprove Commit**: Remove the authenticated user's approval from a commit.
- **Unapprove Pull Request**: Remove the authenticated user's approval on a PR.
- **Update Branch Restriction**: Update a branch restriction's pattern, threshold, or member list.
- **Update Issue**: Patch an issue (send only changed fields; use to transition state).
- **Update Pipeline Variable**: Update a repository-scoped pipeline variable's key, value, or secured flag.
- **Update Pull Request**: Edit an OPEN PR's title, description, reviewers, or destination branch.
- **Update Pull Request Comment**: Replace the body of a PR comment owned by the authenticated user.
- **Update Repository**: Patch a repository's metadata (send only changed fields).
- **Update Repository Webhook**: Update a webhook subscription (events array is replaced, not merged).
- **Update Snippet**: Update a snippet's title, visibility, or files.

## Related prompts

- [Weekly Bitbucket engineering health recap in Notion](https://www.generalinput.com/prompts/weekly-bitbucket-engineering-health-recap-in-notion.md)
- [Announce merged Bitbucket PRs and close the Linear ticket](https://www.generalinput.com/prompts/announce-merged-bitbucket-prs-and-close-the-linear-ticket.md)
- [Log every Bitbucket pipeline run to a Google Sheet](https://www.generalinput.com/prompts/log-every-bitbucket-pipeline-run-to-a-google-sheet.md)
- [Suggest Bitbucket PR reviewers from recent commit history](https://www.generalinput.com/prompts/suggest-bitbucket-pr-reviewers-from-recent-commit-history.md)
- [AI first-pass code review on Bitbucket pull requests](https://www.generalinput.com/prompts/ai-first-pass-code-review-on-bitbucket-pull-requests.md)
- [Weekday Slack nudges for stale Bitbucket pull requests](https://www.generalinput.com/prompts/weekday-slack-nudges-for-stale-bitbucket-pull-requests.md)
- [Turn failed Bitbucket builds into Jira bugs](https://www.generalinput.com/prompts/turn-failed-bitbucket-builds-into-jira-bugs.md)
- [Weekly Bitbucket changelog page in Confluence](https://www.generalinput.com/prompts/weekly-bitbucket-changelog-page-in-confluence.md)

Connect Bitbucket in General Input: https://www.generalinput.com/apps/bitbucket