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.
bb pr merge <id> [options]
| Argument | Description |
|---|
id | Pull request ID |
| Option | Description |
|---|
-w, --workspace <workspace> | Workspace |
-r, --repo <repo> | Repository |
-m, --message <message> | Merge commit message |
--close-source-branch | Delete source branch after merge |
--strategy <strategy> | Merge strategy (see table below) |
--json | Output as JSON |
| Strategy | Description |
|---|
merge_commit | Create a merge commit (default) |
squash | Squash all commits into a single commit |
fast_forward | Fast-forward if possible, fail otherwise |
squash_fast_forward | Squash commits and fast-forward |
rebase_fast_forward | Rebase source commits onto destination and fast-forward |
rebase_merge | Rebase source commits onto destination and create a merge commit |
# 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.
bb pr approve <id> [options]
| Argument | Description |
|---|
id | Pull request ID |
| Option | Description |
|---|
-w, --workspace <workspace> | Workspace |
-r, --repo <repo> | Repository |
--json | Output as JSON |
# Approve PR in current repository
# Approve PR in specific repository
bb pr approve 42 -w myworkspace -r myrepo
Decline a pull request.
bb pr decline <id> [options]
| Argument | Description |
|---|
id | Pull request ID |
| Option | Description |
|---|
-w, --workspace <workspace> | Workspace |
-r, --repo <repo> | Repository |
--json | Output as JSON |
# Decline PR in current repository
# Decline PR in specific repository
bb pr decline 42 -w myworkspace -r myrepo
Mark a draft pull request as ready for review.
bb pr ready <id> [options]
| Argument | Description |
|---|
id | Pull request ID |
| Option | Description |
|---|
-w, --workspace <workspace> | Workspace |
-r, --repo <repo> | Repository |
--json | Output as JSON |
# Mark draft PR in specific repository
bb pr ready 42 -w myworkspace -r myrepo