Developer tools
Connect agents to Bitbucket Cloud.
Agents can use the Bitbucket Cloud REST API to read repositories, manage pull requests, and inspect builds. Workflows can start on supported webhook events, subject to the connection's permissions and filters.
5,000 free credits to start.
Agent reach
Bitbucket Cloud REST API
The full surface, searched at run time.
Connect with
- API key
- Your own OAuth app
Use an Atlassian API token, a Bitbucket access token, or your own Bitbucket OAuth consumer. Helios registers the webhook for trigger events when you save the connection.
Event triggers
Yes · 6 events
Plus manual, schedule, and signed webhook.
What the agent can do
What agents do with Bitbucket
Helios searches the Bitbucket Cloud REST API at run time. The agent finds the endpoint the task needs and calls it.
- Call Bitbucket Cloud REST API endpoints with your connection's permissions.
- Open, comment on, approve, decline, and merge pull requests.
- Read diffs, commits, branches, and files at any ref.
- Read build statuses and Bitbucket Pipelines runs, steps, and logs.
- Create branches and tags, report build statuses, and run pipelines.
- Start runs on supported pull request, comment, push, build status, and Pipelines trace events.
Examples
Tasks you can hand to a Bitbucket agent
Review every pull request as it opens
The agent reads the diff and the files around it, then leaves a review comment with the risks it found.
On each new pull request into main: review the diff and comment with the review.
- bitbucket·read the pull request and its diff
- bitbucket·read the changed files at the source branch
- code·check the change against the tests
- bitbucket·comment with the review
Reviewed pull request #318
- The retry loop has no upper bound
- One new function has no test
- The migration matches the model change
Explain a failed build
When a build fails, the agent reads the Pipelines logs and tells the author what broke on the pull request.
When a build fails on a pull request branch, explain the failure on the pull request.
- bitbucket·read the failed pipeline and its steps
- bitbucket·download the step log
- bitbucket·find the open pull request for the branch
- bitbucket·comment with the cause
Explained the failure on pull request #322
- `test_invoice_totals` fails after the rounding change
- The fix is a one-line change in `totals.py`
Answer questions in pull request comments
When someone asks a question in a comment, the agent looks it up and replies on the same pull request.
When a pull request comment asks the agent a question, answer it.
- bitbucket·read the comment and the pull request
- bitbucket·search the code it mentions
- bitbucket·reply on the pull request
Replied on pull request #330
- The config flag is read in `settings.py`
- It defaults to off in production
Write release notes after a merge
When a pull request merges into main, the agent adds it to the draft release notes and tells the team.
When a pull request merges into main, add it to the release notes and post to Slack.
- bitbucket·read the merged pull request
- notion·append to the release notes draft
- slack·post a summary to #releases
Release notes updated
- Added pull request #335 under Fixes
- Posted to #releases
Event triggers
Start a run on Bitbucket events
Attach any of these events to a workflow and filter on the fields that matter. Manual, schedule, and signed webhook triggers work too.
| Event | What it means |
|---|---|
pull_request.created | A pull request is opened. Filter by repository or destination branch. |
pull_request.approved | Someone approves a pull request, so the agent can check it is ready to merge. |
pull_request.merged | A pull request is merged, so the agent can follow up on shipped work. |
pull_request_comment.created | Someone comments on a pull request, so an agent can answer or pick up the follow-up. |
repository.pushed | Commits or tags are pushed. Filter by branch so only `main` wakes the agent, or by tag for releases. |
build_status.updated | A build status changes, such as a Bitbucket Pipelines run. Filter by build state to catch failures. |
Works with
Bitbucket works with the rest of your stack
One agent, one run, several services. It reads from one tool and writes to the next in the same sandbox.
FAQ
Questions, answered
Put an agent on Bitbucket.
Connect it once and describe the task in chat. Then reuse the prompt as a workflow on a schedule or a webhook.