Check and address PR review comments from Bitbucket Data Center
IMPORTANT: Always use the scripts in bin/ for Bitbucket operations. Never construct curl commands directly - the scripts handle authentication, escaping, and error handling correctly.
Scripts are in the skill's bin/ directory. Call them by full path or add to PATH.
Required environment variables:
export BITBUCKET_TOKEN='your-http-access-token'
export BITBUCKET_URL='https://bitbucket.example.com' # no trailing slash
export BITBUCKET_USER='your-email' # optional, defaults to git config user.email
Add to ~/.claude/settings.json:
{
"env": {
"BITBUCKET_TOKEN": "your-token",
"BITBUCKET_URL": "https://bitbucket.example.com"
}
}
Get unresolved comments for a PR. Outputs JSON array.
# For specific PR
bb-pr-comments 42
# Auto-detect PR from current branch
bb-pr-comments
Output format:
[
{
"id": 12345,
"author": "Jane Doe",
"text": "Should this be nullable?",
"path": "src/main/java/Foo.java",
"line": 42,
"state": "OPEN",
"severity": "NORMAL"
}
]
Reply to a comment after addressing it.
bb-pr-reply 42 12345 "Fixed in latest commit"
Mark a comment as resolved.
bb-pr-resolve 42 12345
Merge a PR (fetches version automatically).
bb-pr-merge 42
Get PR details (state, reviewers, branches).
bb-pr-info 42
bb-pr-info # auto-detect from current branch
List open PRs in the repo.
bb-pr-list # all open PRs
bb-pr-list --mine # only your PRs
Create a new PR from current branch.
bb-pr-create "Fix login bug"
bb-pr-create "Add feature" "Detailed description here"
bb-pr-create "Hotfix" --to develop
When asked to address PR feedback:
bb-pr-comments PR_ID to get unresolved commentspath and line, read that file locationgit add -A && git commit -m "Address PR feedback: ..." && git pushbb-pr-reply PR_ID COMMENT_ID "Done" or bb-pr-resolve PR_ID COMMENT_IDTo avoid approving each script call, add to ~/.claude/settings.json:
{
"permissions": {
"allow": [
"Bash(bb-pr-*)",
"Bash(git add*)",
"Bash(git commit*)",
"Bash(git push*)"
]
}
}
Or for trusted repos, use claude --dangerously-skip-permissions.