Skip to content

Review and Merge

Complete review and merge pull request workflows.

Global options available on all PR commands: --json, --no-color, -w, --workspace, -r, --repo.

Merge a pull request.

Terminal window
bb pr merge <id> [options]
ArgumentDescription
idPull request ID
OptionDescription
-w, --workspace <workspace>Workspace
-r, --repo <repo>Repository
-m, --message <message>Merge commit message
--close-source-branchDelete source branch after merge
--strategy <strategy>Merge strategy (see table below)
--jsonOutput as JSON
StrategyDescription
merge_commitCreate a merge commit (default)
squashSquash all commits into a single commit
fast_forwardFast-forward if possible, fail otherwise
squash_fast_forwardSquash commits and fast-forward
rebase_fast_forwardRebase source commits onto destination and fast-forward
rebase_mergeRebase source commits onto destination and create a merge commit
Terminal window
# Merge PR #42
bb pr merge 42
# Merge with squash strategy and delete source branch
bb pr merge 42 --strategy squash --close-source-branch
# Merge with custom commit message
bb pr merge 42 -m "Merge feature: Add user authentication"
# Rebase and fast-forward
bb pr merge 42 --strategy rebase_fast_forward

Approve a pull request.

Terminal window
bb pr approve <id> [options]
ArgumentDescription
idPull request ID
OptionDescription
-w, --workspace <workspace>Workspace
-r, --repo <repo>Repository
--jsonOutput as JSON
Terminal window
# Approve PR in current repository
bb pr approve 42
# Approve PR in specific repository
bb pr approve 42 -w myworkspace -r myrepo

Decline a pull request.

Terminal window
bb pr decline <id> [options]
ArgumentDescription
idPull request ID
OptionDescription
-w, --workspace <workspace>Workspace
-r, --repo <repo>Repository
--jsonOutput as JSON
Terminal window
# Decline PR in current repository
bb pr decline 42
# Decline PR in specific repository
bb pr decline 42 -w myworkspace -r myrepo

Mark a draft pull request as ready for review.

Terminal window
bb pr ready <id> [options]
ArgumentDescription
idPull request ID
OptionDescription
-w, --workspace <workspace>Workspace
-r, --repo <repo>Repository
--jsonOutput as JSON
Terminal window
# Mark draft PR as ready
bb pr ready 42
# Mark draft PR in specific repository
bb pr ready 42 -w myworkspace -r myrepo