Manage pull request comments.
Global options available on all PR commands: --json, --no-color, -w, --workspace, -r, --repo.
| Subcommand | Description |
|---|
list <id> | List comments on a pull request |
add <id> <message> | Add a comment to a pull request |
edit <pr-id> <comment-id> <message> | Edit a comment on a pull request |
delete <pr-id> <comment-id> | Delete a comment on a pull request |
List comments on a pull request.
| Argument | Description |
|---|
id | Pull request ID |
| Option | Description |
|---|
-w, --workspace <workspace> | Workspace |
-r, --repo <repo> | Repository |
--limit <number> | Maximum number of comments (default: 25) |
--no-truncate | Show full comment content without truncation |
--json | Output as JSON |
# List comments on PR #42
bb pr comments list 42 --limit 50
# Show full comment content (not truncated)
bb pr comments list 42 --no-truncate
# List comments in specific repository
bb pr comments list 42 -w myworkspace -r myrepo
bb pr comments list 42 --json
- By default, comment content is truncated to 60 characters in the table view
- Use
--no-truncate to display the full comment text
--limit is enforced across paginated comment responses
Add a comment to a pull request. Supports both general comments and inline comments on specific file lines.
bb pr comments add <id> <message> [options]
| Argument | Description |
|---|
id | Pull request ID |
message | Comment message |
| Option | Description |
|---|
--file <path> | File path for an inline comment (requires --line-to and/or --line-from) |
--line-to <number> | Line number in the new version of the file (requires --file) |
--line-from <number> | Line number in the old version of the file (requires --file) |
-w, --workspace <workspace> | Workspace |
-r, --repo <repo> | Repository |
--json | Output as JSON |
# Add a general comment to PR #42
bb pr comments add 42 "LGTM! This looks great."
# Add an inline comment on a specific line in the new file
bb pr comments add 42 "Consider renaming this variable" --file src/index.ts --line-to 15
# Add an inline comment on a line in the old (removed) version of the file
bb pr comments add 42 "Why was this removed?" --file src/utils.ts --line-from 10
# Add an inline comment spanning old and new lines
bb pr comments add 42 "This logic changed" --file src/app.ts --line-from 5 --line-to 8
# Add a comment to PR in specific repository
bb pr comments add 42 "Please review this." -w myworkspace -r myrepo
bb pr comments add 42 "Good job!" --json
--file is required when using --line-to or --line-from
- At least one of
--line-to or --line-from is required when using --file
- Line numbers must be positive integers
Edit a comment on a pull request.
bb pr comments edit <pr-id> <comment-id> <message>
| Argument | Description |
|---|
pr-id | Pull request ID |
comment-id | Comment ID |
message | New comment message |
| Option | Description |
|---|
-w, --workspace <workspace> | Workspace |
-r, --repo <repo> | Repository |
--json | Output as JSON |
# Edit comment #123 on PR #42
bb pr comments edit 42 123 "Updated: I noticed something else..."
# Edit comment in specific repository
bb pr comments edit 42 123 "Revised feedback" -w myworkspace -r myrepo
# Get updated comment as JSON
bb pr comments edit 42 123 "Final comment" --json
Delete a comment from a pull request.
bb pr comments delete <pr-id> <comment-id>
| Argument | Description |
|---|
pr-id | Pull request ID |
comment-id | Comment ID |
| Option | Description |
|---|
-w, --workspace <workspace> | Workspace |
-r, --repo <repo> | Repository |
--json | Output as JSON |
# Delete comment #123 from PR #42
bb pr comments delete 42 123
# Delete comment in specific repository
bb pr comments delete 42 456 -w myworkspace -r myrepo
# Delete comment with JSON output
bb pr comments delete 42 456 --json
- Deleting a comment is permanent and cannot be undone