Skip to content

PR Commands

Manage pull requests in Bitbucket repositories.

Global options available on all PR commands: --json [fields], --jq <expression>, --no-color, -w, --workspace, -r, --repo.

--json accepts an optional comma-separated field list to project the output, and --jq filters the JSON in-process — see JSON Output for the full reference.

Choose a Workflow Task-based

Section titled “Choose a Workflow ”
Start with PR creation
TaskCommand
Create a PRbb pr create -t "Add feature"
Create a PR with the repo’s default reviewersbb pr create -t "Add feature" --default-reviewers
List open PRsbb pr list
List all PRs (ignore the default limit)bb pr list --all
List PRs where you are a reviewerbb pr list --mine
View PR detailsbb pr view 42
View checksbb pr checks 42
Review diffbb pr diff 42 --stat
Checkout PR locallybb pr checkout 42
Approve PRbb pr approve 42
Merge PRbb pr merge 42 --strategy squash

Use --json when scripting. The optional field list (--json id,title,state) projects to just those fields, and --jq filters in-process — no external jq binary required:

Terminal window
# Project to specific fields (returns a flat array)
bb pr list --json id,title,author.display_name
# Filter with built-in --jq
bb pr list --json --jq '.pullRequests[] | select(.state == "OPEN") | .title'
# Combine projection + filter (jq runs after projection)
bb pr list --json id,title,state --jq '.[] | select(.state == "OPEN") | .title'
# Grab a PR URL from view output
bb pr view 42 --json --jq '.links.html.href'
# Capture diffstat totals
bb pr diff 42 --stat --json --jq '{filesChanged, totalAdditions, totalDeletions}'