bb pr¶
Create, review, merge and inspect pull requests
A command that takes <pr-id> takes a pull request in any of three forms: its number, as 42 or #42; the branch it comes from, which picks that branch's open pull request when it has one; or its URL, which names the repository too, so --repo is not needed with it.
42 commands.
bb pr activity- List what happened on a pull request (1 command)
bb pr auto-merge- Turn a pull request's auto-merge on or off, or read it (3 commands)
bb pr build- Show the builds of a pull request (1 command)
bb pr checkout- Check out a pull request branch locally
bb pr checks- Show build statuses for a pull request's source commit (alias for bb pr build status)
bb pr comment- Add, list, resolve and react to pull request comments (8 commands)
bb pr commits- List the commits in a pull request
bb pr create- Create a pull request
bb pr decline- Decline a pull request
bb pr default-reviewers- List default reviewers and matching conditions for repository
bb pr diff- Diff a pull request (alias for bb diff pr)
bb pr files- List the files changed in a pull request
bb pr get- Get pull request details, including outstanding review feedback
bb pr jira- List Jira issues associated with a pull request
bb pr list- List pull requests
bb pr merge- Merge a pull request
bb pr merge-base- Show the common ancestor commit of a pull request's source and target branches
bb pr participants- Search pull request participants across a repository
bb pr ready- Mark a draft pull request ready for review, or turn it back into a draft
bb pr rebase- Rebase a pull request
bb pr reopen- Reopen a pull request
bb pr review- Approve or request changes, and publish or discard a review (8 commands)
bb pr status- Show pull requests waiting on you
bb pr unwatch- Unwatch a pull request
bb pr update- Update pull request metadata
bb pr watch- Watch a pull request
bb pr activity¶
List what happened on a pull request
Pull request activity commands. This is an explicit exception to the stable versioned API and is intended only for AI ingestion and debugging.
list- List raw pull request activity items
bb pr activity list¶
List raw pull request activity items
bb pr activity list [pr-id] [flags]
List raw pull request activity items. This output is an explicit exception to the stable versioned API and is intended only for AI ingestion and debugging.
# Everything that happened on a pull request, as Bitbucket records it
bb pr activity list 42 --repo PROJ/repo --all
--all- Return every result rather than the first --limit
--limit int- Maximum number of results to return (default 25)
Inherited from bb pr:
--repo string- Repository as PROJECT/slug (defaults to the repository of the git checkout you are in, then BITBUCKET_PROJECT_KEY + BITBUCKET_REPO_SLUG)
Also takes the global flags.
Dry run: Runs as usual: this command changes nothing, so there is nothing to hold back
Output with --json, where ? marks a field that can be absent
data
repository object
projectKey string Project key the repository belongs to.
slug string Repository slug.
pullRequestId string Pull request the timeline belongs to.
activities list of object or null Timeline entries, newest first.
id? integer Activity identifier.
action? string What happened: OPENED, COMMENTED, APPROVED, RESCOPED, MERGED, DECLINED
and so on.
createdDate? integer When, in milliseconds since the epoch.
comment? object The comment, when the action was COMMENTED.
id? integer Comment identifier.
version integer Optimistic-locking version.
text? string The comment text.
state? string OPEN, RESOLVED or PENDING.
severity? string NORMAL for an ordinary comment, BLOCKER for a task.
pending boolean Whether this is an unpublished draft comment.
resolved boolean Whether the thread this comment belongs to is resolved.
anchored boolean Whether the comment is attached to a line rather than to the commit or
pull request.
reply boolean Whether this comment is a reply to another rather than the root of a
thread.
parentId? integer Comment this one replies to.
anchor? object Where in the diff it sits.
path? string File the comment is anchored to.
srcPath? string Path before a rename, when the file was renamed.
line? integer Line within that file.
lineType? string ADDED, REMOVED or CONTEXT.
fileType? string FROM or TO, which side of the diff the line is on.
diffType? string COMMIT, EFFECTIVE or RANGE.
fromHash? string Commit the diff was taken from.
toHash? string Commit the diff was taken to.
author? object Who wrote it.
id? integer User identifier.
name? string Username.
displayName? string Human-readable name.
emailAddress? string Email address, when the instance exposes it.
slug? string URL-safe form of the username.
type? string Account kind: NORMAL for a person, SERVICE for an integration account.
active boolean Whether the account is enabled.
replyCount integer Direct replies to this comment.
createdDate? integer When it was written, in milliseconds since the epoch.
updatedDate? integer When it last changed, in milliseconds since the epoch.
resolvedDate? integer When it was resolved, in milliseconds since the epoch.
properties? map of any Per-comment extras Bitbucket attaches, reactions among them.
raw map of any The upstream activity entry, unchanged.
bb pr auto-merge¶
Turn a pull request's auto-merge on or off, or read it
disable- Disable auto-merge on a pull request
enable- Enable auto-merge on a pull request
get- Get auto-merge configuration for a pull request
bb pr auto-merge disable¶
Disable auto-merge on a pull request
bb pr auto-merge disable <pr-id>
# Stop a pull request from merging on its own
bb pr auto-merge disable 42 --repo PROJ/repo
Inherited from bb pr:
--repo string- Repository as PROJECT/slug (defaults to the repository of the git checkout you are in, then BITBUCKET_PROJECT_KEY + BITBUCKET_REPO_SLUG)
Also takes the global flags.
Dry run: Checks your permission and the current state this depends on, without changing anything (preconditions-checked)
Output with --json, where ? marks a field that can be absent
data
status string Outcome of the command.
repository object
projectKey string Project key the repository belongs to.
slug string Repository slug.
pullRequestId string Pull request whose pending auto-merge was cancelled.
bb pr auto-merge enable¶
Enable auto-merge on a pull request
bb pr auto-merge enable <pr-id> [flags]
# Enable auto-merge with the default strategy (no-ff)
bb pr auto-merge enable 42 --repo PROJ/repo
# Enable auto-merge with a specific strategy
bb pr auto-merge enable 42 --repo PROJ/repo --strategy rebase-ff-only
--strategy string- Merge strategy (one of: no-ff, ff, ff-only, rebase-no-ff, rebase-ff-only, squash, squash-ff-only) (default "no-ff")
Inherited from bb pr:
--repo string- Repository as PROJECT/slug (defaults to the repository of the git checkout you are in, then BITBUCKET_PROJECT_KEY + BITBUCKET_REPO_SLUG)
Also takes the global flags.
Dry run: Checks your permission and the current state this depends on, without changing anything (preconditions-checked)
Output with --json, where ? marks a field that can be absent
data
repository object
projectKey string Project key the repository belongs to.
slug string Repository slug.
pullRequestId string Pull request the auto-merge belongs to.
autoMerge object
enabled boolean Whether an auto-merge is pending.
strategyId? string Merge strategy the auto-merge will use.
mergedImmediately? boolean True when arming merged the pull request outright because its checks already passed.
enabled is false in that case: there is nothing left pending.
bb pr auto-merge get¶
Get auto-merge configuration for a pull request
bb pr auto-merge get [pr-id]
# Whether a pull request merges on its own, and how
bb pr auto-merge get 42 --repo PROJ/repo
Inherited from bb pr:
--repo string- Repository as PROJECT/slug (defaults to the repository of the git checkout you are in, then BITBUCKET_PROJECT_KEY + BITBUCKET_REPO_SLUG)
Also takes the global flags.
Dry run: Runs as usual: this command changes nothing, so there is nothing to hold back
Output with --json, where ? marks a field that can be absent
data
repository object
projectKey string Project key the repository belongs to.
slug string Repository slug.
pullRequestId string Pull request the auto-merge belongs to.
autoMerge object
enabled boolean Whether an auto-merge is pending.
strategyId? string Merge strategy the auto-merge will use.
mergedImmediately? boolean True when arming merged the pull request outright because its checks already passed.
enabled is false in that case: there is nothing left pending.
bb pr build¶
Show the builds of a pull request
status- Show build statuses for a pull request's source commit (also available as bb pr checks)
bb pr build status¶
Show build statuses for a pull request's source commit (also available as bb pr checks)
bb pr build status [pr-id] [flags]
Without --json, the exit status reports the builds, as gh pr checks does: 1 when one failed, 8 when none failed and one is still in progress or has no result, and 0 otherwise, a cancelled build included. It counts every build, not only the --limit shown. With --json the exit status is 0 and each build's state is in the output.
# The builds of a pull request's latest commit
bb pr build status 42 --repo PROJ/repo
# Merge only when none failed and none is still running
bb pr build status 42 --repo PROJ/repo && bb pr merge 42 --repo PROJ/repo
--all- Return every result rather than the first --limit
--limit int- Maximum number of results to return (default 25)
Inherited from bb pr:
--repo string- Repository as PROJECT/slug (defaults to the repository of the git checkout you are in, then BITBUCKET_PROJECT_KEY + BITBUCKET_REPO_SLUG)
Also takes the global flags.
Dry run: Runs as usual: this command changes nothing, so there is nothing to hold back
Output with --json, where ? marks a field that can be absent
data
repository object
projectKey string Project key the repository belongs to.
slug string Repository slug.
pullRequestId string Pull request whose head commit was checked.
statuses list of object or null Builds reported against that commit.
key? string Build key, unique per commit.
state? SUCCESSFUL|FAILED|INPROGRESS|CANCELLED|UNKNOWN
url? string Link to the build in the reporting system.
name? string Display name of the build.
bb pr checkout¶
Check out a pull request branch locally
bb pr checkout <pr-id> [flags]
Check out the source branch of a pull request in the current git repository.
Same-repository pull requests are checked out from the remote that already points at the repository. Pull requests from a fork fetch from the fork, adding a remote for it when one is not configured yet, so a later git push goes back to the fork branch the pull request is built from.
The fetch uses the credentials bb is already authenticated with, so no git credential setup is needed first. Pushing afterwards is plain git and does need one: run bb auth setup-git once.
# Check out a pull request's branch in the current repository
bb pr checkout 42
# Under a local name of your choice
bb pr checkout 42 --branch review/42
# Look at its commit without creating a branch
bb pr checkout 42 --detach
--branch string- Local branch name to use (defaults to the pull request source branch)
--detach- Check out the source commit without creating or moving a local branch
--force- Check out even when tracked files have uncommitted changes, discarding them
Inherited from bb pr:
--repo string- Repository as PROJECT/slug (defaults to the repository of the git checkout you are in, then BITBUCKET_PROJECT_KEY + BITBUCKET_REPO_SLUG)
Also takes the global flags.
Dry run: Shows that it would create a local branch, without doing it; nothing is checked first (predicted)
Output with --json, where ? marks a field that can be absent
data
pullRequest integer Pull request number that was checked out.
branch? string Local branch the checkout landed on.
detached boolean Whether the working tree is on a detached HEAD rather than a branch.
remote string Git remote the source branch was fetched from.
remoteUrl string URL of that remote.
remoteAdded boolean Whether bb added that remote, which happens for a fork it had not seen before.
sourceBranch string Branch the pull request merges from.
sourceRepository string Repository that branch lives in, as PROJECT/slug.
fork boolean Whether the pull request comes from a fork.
fastForwarded boolean Whether an existing local branch was fast-forwarded rather than created.
bb pr checks¶
Show build statuses for a pull request's source commit (alias for bb pr build status)
bb pr checks [pr-id] [flags]
Without --json, the exit status reports the builds, as gh pr checks does: 1 when one failed, 8 when none failed and one is still in progress or has no result, and 0 otherwise, a cancelled build included. It counts every build, not only the --limit shown. With --json the exit status is 0 and each build's state is in the output.
# The builds of a pull request's latest commit
bb pr checks 42 --repo PROJ/repo
# Merge only when none failed and none is still running
bb pr checks 42 --repo PROJ/repo && bb pr merge 42 --repo PROJ/repo
--all- Return every result rather than the first --limit
--limit int- Maximum number of results to return (default 25)
Inherited from bb pr:
--repo string- Repository as PROJECT/slug (defaults to the repository of the git checkout you are in, then BITBUCKET_PROJECT_KEY + BITBUCKET_REPO_SLUG)
Also takes the global flags.
Dry run: Runs as usual: this command changes nothing, so there is nothing to hold back
Output with --json, where ? marks a field that can be absent
data
repository object
projectKey string Project key the repository belongs to.
slug string Repository slug.
pullRequestId string Pull request whose head commit was checked.
statuses list of object or null Builds reported against that commit.
key? string Build key, unique per commit.
state? SUCCESSFUL|FAILED|INPROGRESS|CANCELLED|UNKNOWN
url? string Link to the build in the reporting system.
name? string Display name of the build.
bb pr comment¶
Add, list, resolve and react to pull request comments
add- Add a comment to a pull request
apply-suggestion- Apply a suggested change from a comment
delete- Delete a pull request comment or task
get- Get a pull request comment
list- List comment threads for a pull request, unresolved first
react- Add or remove a reaction on a pull request comment
reopen- Reopen a resolved pull request comment
resolve- Resolve a pull request comment, closing it as a task
bb pr comment add¶
Add a comment to a pull request
bb pr comment add <pr-id> [flags]
Pass --path and --line to anchor the comment to a file and line, or --parent-id to reply to an existing comment. Bitbucket only accepts an anchor on a line that appears in the pull request diff, so the line has to be inside a changed hunk and --line-type has to match the side it is on.
# A pull-request-level comment
bb pr comment add 49 --repo PROJ/repo --text "Looks good overall."
# Anchored to a line in the diff
bb pr comment add 49 --repo PROJ/repo --path app/core/runner.py --line 157 \
--text "This raises after the execution is recorded."
# A line that only exists in the original file
bb pr comment add 49 --repo PROJ/repo --path app/core/runner.py --line 88 \
--line-type REMOVED --text "Why was this dropped?"
# Reply to an existing comment
bb pr comment add 49 --repo PROJ/repo --parent-id 1389396 --text "Agreed, fixed."
# A task: Bitbucket models one as a blocker comment
bb pr comment add 49 --repo PROJ/repo --blocker --text "Add a test for the empty case."
# A draft, which bb pr review complete publishes with the rest of your review
bb pr comment add 49 --repo PROJ/repo --pending --text "Naming: prefer retryCount."
--blocker- Mark the comment as a blocker
--line int- Line number for an inline comment
--line-type string- Line type for an inline comment, ADDED when not given (one of: ADDED, REMOVED, CONTEXT)
--parent-id int- Parent comment ID to reply to
--path string- File path for an inline comment
--pending- Mark the comment as pending (draft)
--text string- Comment text
Inherited from bb pr:
--repo string- Repository as PROJECT/slug (defaults to the repository of the git checkout you are in, then BITBUCKET_PROJECT_KEY + BITBUCKET_REPO_SLUG)
Also takes the global flags.
Dry run: Predicts the outcome from what it can read, without changing anything (predicted)
Output with --json, where ? marks a field that can be absent
data
repository object
projectKey string Project key the repository belongs to.
slug string Repository slug.
pullRequestId string Pull request the comment was added to.
comment object The comment as Bitbucket stored it.
id? integer Comment identifier.
version integer Optimistic-locking version.
text? string The comment text.
state? OPEN|RESOLVED|PENDING
severity? string NORMAL for an ordinary comment, BLOCKER for a task.
pending boolean Whether this is an unpublished draft comment.
resolved boolean Whether the thread this comment belongs to is resolved.
anchored boolean Whether the comment is attached to a line rather than to the commit or pull
request.
reply boolean Whether this comment is a reply to another rather than the root of a thread.
parentId? integer Comment this one replies to.
anchor? object Where in the diff it sits.
path? string File the comment is anchored to.
srcPath? string Path before a rename, when the file was renamed.
line? integer Line within that file.
lineType? string ADDED, REMOVED or CONTEXT.
fileType? string FROM or TO, which side of the diff the line is on.
diffType? string COMMIT, EFFECTIVE or RANGE.
fromHash? string Commit the diff was taken from.
toHash? string Commit the diff was taken to.
author? object Who wrote it.
id? integer User identifier.
name? string Username.
displayName? string Human-readable name.
emailAddress? string Email address, when the instance exposes it.
slug? string URL-safe form of the username.
type? string Account kind: NORMAL for a person, SERVICE for an integration account.
active boolean Whether the account is enabled.
replyCount integer Direct replies to this comment.
createdDate? integer When it was written, in milliseconds since the epoch.
updatedDate? integer When it last changed, in milliseconds since the epoch.
resolvedDate? integer When it was resolved, in milliseconds since the epoch.
properties? map of any Per-comment extras Bitbucket attaches, reactions among them.
blocker boolean Whether it was posted as a task rather than an ordinary comment.
pending boolean Whether it was posted as an unpublished draft.
path? string File it was asked to be anchored to, when --path was given.
line? integer Line it was asked to be anchored to, when --line was given.
lineType? ADDED|REMOVED|CONTEXT Side of the diff that line is on, when --line-type was given.
parentId? integer Comment it was posted as a reply to, when --parent was given.
bb pr comment apply-suggestion¶
Apply a suggested change from a comment
bb pr comment apply-suggestion <pr-id> <comment-id> [flags]
# Commit the change a reviewer suggested in a comment
bb pr comment apply-suggestion 42 1389396 --repo PROJ/repo
# The second suggestion in the comment, with a commit message of your own
bb pr comment apply-suggestion 42 1389396 --repo PROJ/repo --index 1 \
--commit-message "Use the shared retry helper"
--comment-version int32- Optional expected version of the comment
--commit-message string- Commit message for the applied suggestion (default: names the comment)
--index int32- Optional index of the suggestion in the comment (default 0)
--pr-version int32- Optional expected version of the pull request
Inherited from bb pr:
--repo string- Repository as PROJECT/slug (defaults to the repository of the git checkout you are in, then BITBUCKET_PROJECT_KEY + BITBUCKET_REPO_SLUG)
Also takes the global flags.
Dry run: Predicts the outcome from what it can read, without changing anything (predicted)
Output with --json, where ? marks a field that can be absent
data
status string Outcome of the command.
repository object
projectKey string Project key the repository belongs to.
slug string Repository slug.
pullRequestId string Pull request the suggestion was applied to.
commentId string Comment carrying the suggestion that was applied.
bb pr comment delete¶
Delete a pull request comment or task
bb pr comment delete <pr-id> <comment-id> [flags]
Delete a pull request comment, or a task, which Bitbucket keeps as a comment.
Bitbucket lets the comment's author delete it, and anyone who administers the repository. It refuses a comment that has replies: delete the replies first. The comment's current version is read unless --version names the one you expect, and then a comment that changed since is refused rather than deleted.
# A comment, or a task, by the id bb pr comment list prints
bb pr comment delete 42 1389396 --repo PROJ/repo
# Refused if the comment changed since you read version 3
bb pr comment delete 42 1389396 --repo PROJ/repo --version 3
--version int32- Expected comment version; a comment that changed since is refused
-y, --yes- Confirm without being asked; applies only when the target is named with --repo PROJECT/slug
Inherited from bb pr:
--repo string- Repository as PROJECT/slug (defaults to the repository of the git checkout you are in, then BITBUCKET_PROJECT_KEY + BITBUCKET_REPO_SLUG)
Also takes the global flags.
Dry run: Checks your permission and the current state this depends on, without changing anything (preconditions-checked)
Output with --json, where ? marks a field that can be absent
data
status string Outcome of the command.
repository object
projectKey string Project key the repository belongs to.
slug string Repository slug.
pullRequestId string Pull request the comment belonged to.
commentId string Identifier of the comment that was deleted, as it was given on the command line.
version? integer Version the delete was performed against.
bb pr comment get¶
Get a pull request comment
bb pr comment get <pr-id> <comment-id>
Get a single pull request comment by id. This is the authoritative single-comment view and is better suited than list output when you need the full rendered comment payload.
# One comment in full, by the id bb pr comment list prints
bb pr comment get 42 1389396 --repo PROJ/repo
Inherited from bb pr:
--repo string- Repository as PROJECT/slug (defaults to the repository of the git checkout you are in, then BITBUCKET_PROJECT_KEY + BITBUCKET_REPO_SLUG)
Also takes the global flags.
Dry run: Runs as usual: this command changes nothing, so there is nothing to hold back
Output with --json, where ? marks a field that can be absent
data
repository object
projectKey string Project key the repository belongs to.
slug string Repository slug.
pullRequestId string Pull request the comment belongs to.
comment object
id? integer Comment identifier.
version integer Optimistic-locking version.
text? string The comment text.
state? OPEN|RESOLVED|PENDING
severity? string NORMAL for an ordinary comment, BLOCKER for a task.
pending boolean Whether this is an unpublished draft comment.
resolved boolean Whether the thread this comment belongs to is resolved.
anchored boolean Whether the comment is attached to a line rather than to the commit or pull
request.
reply boolean Whether this comment is a reply to another rather than the root of a thread.
parentId? integer Comment this one replies to.
anchor? object Where in the diff it sits.
path? string File the comment is anchored to.
srcPath? string Path before a rename, when the file was renamed.
line? integer Line within that file.
lineType? string ADDED, REMOVED or CONTEXT.
fileType? string FROM or TO, which side of the diff the line is on.
diffType? string COMMIT, EFFECTIVE or RANGE.
fromHash? string Commit the diff was taken from.
toHash? string Commit the diff was taken to.
author? object Who wrote it.
id? integer User identifier.
name? string Username.
displayName? string Human-readable name.
emailAddress? string Email address, when the instance exposes it.
slug? string URL-safe form of the username.
type? string Account kind: NORMAL for a person, SERVICE for an integration account.
active boolean Whether the account is enabled.
replyCount integer Direct replies to this comment.
createdDate? integer When it was written, in milliseconds since the epoch.
updatedDate? integer When it last changed, in milliseconds since the epoch.
resolvedDate? integer When it was resolved, in milliseconds since the epoch.
properties? map of any Per-comment extras Bitbucket attaches, reactions among them.
bb pr comment list¶
List comment threads for a pull request, unresolved first
bb pr comment list [pr-id] [flags]
List pull request comment threads. Bitbucket models a task as a blocker comment, so this returns reviewer comments and tasks in one view, each with its resolution state, anchor and reply count.
Without --path this uses the pull request activity timeline to return the aggregate comment view. With --path it uses the path-scoped comments endpoint. With --blocker it lists blocker comments.
Use --unresolved to show only threads still waiting on someone. Use --full to add every comment ungrouped, alongside the thread view rather than in place of it.
# Every comment thread and task, unresolved first
bb pr comment list 42 --repo PROJ/repo
# Only what is still waiting on someone
bb pr comment list 42 --repo PROJ/repo --unresolved
# The open tasks
bb pr comment list 42 --repo PROJ/repo --tasks-only --state open
# The comments on one file, with every reply
bb pr comment list 42 --repo PROJ/repo --path src/main.go --with-replies
--all- Return every result rather than the first --limit
--blocker- List pull request blocker comments
--full- Add every comment ungrouped, alongside the thread view
--limit int- Maximum number of results to return (default 25)
--path string- Optional file path for path-scoped pull request comment listing
--state string- Filter threads by resolution state (one of: open, unresolved, resolved, pending, all) (default "all")
--tasks-only- Show only threads Bitbucket tracks as tasks (blocker comments)
--unresolved- Show only unresolved threads (shorthand for --state open)
--with-replies- Include the full text of every reply instead of only the most recent one
Inherited from bb pr:
--repo string- Repository as PROJECT/slug (defaults to the repository of the git checkout you are in, then BITBUCKET_PROJECT_KEY + BITBUCKET_REPO_SLUG)
Also takes the global flags.
Dry run: Runs as usual: this command changes nothing, so there is nothing to hold back
Output with --json, where ? marks a field that can be absent
data
repository object
projectKey string Project key the repository belongs to.
slug string Repository slug.
pullRequestId string Pull request the comments belong to.
source string Which endpoint answered: activity for the timeline, path for the
path-scoped endpoint, blocker for the task endpoint.
path? string File the listing was scoped to, when --path was given.
state? open|resolved|pending|all State filter that was applied. --state unresolved is reported as open.
summary object
totalThreads integer unresolved + resolved + pending.
unresolved integer Threads still waiting on someone, tasks included.
resolved integer Threads that have been resolved.
pending integer The author's own unpublished draft comments.
openTasks integer The subset of unresolved that Bitbucket tracks as tasks.
resolvedTasks integer The subset of resolved that Bitbucket tracks as tasks.
unresolvedInline? integer The subset of unresolved anchored to a file.
threads list of object or null Comment threads, unresolved first.
id integer Comment identifier of the thread root, which resolve, reopen and react
address.
kind string comment for an ordinary thread, task for a blocker comment.
state? OPEN|RESOLVED|PENDING
resolved boolean Whether the thread has been resolved.
author? string Who opened the thread.
version integer Optimistic-locking version of the root comment.
createdDate? integer When the thread was opened, in milliseconds since the epoch.
updatedDate? integer When it last changed, in milliseconds since the epoch.
anchor? object Where in the diff it is anchored.
path string File the thread is anchored to.
line? integer Line within that file.
lineType? string ADDED, REMOVED or CONTEXT.
orphaned? boolean Whether the anchored line no longer exists in the diff.
text? string The thread's opening comment.
hasSuggestion? boolean Whether the text carries a Bitbucket suggestion block, which bb pr
comment apply-suggestion can apply.
replyCount integer How many replies the thread has.
lastReply? object The most recent reply, when there is one.
id integer Comment identifier of the reply.
author? string Who wrote it.
date? integer When, in milliseconds since the epoch.
text? string The reply text.
replies? list of object Every reply.
id integer Comment identifier of the reply.
author? string Who wrote it.
date? integer When, in milliseconds since the epoch.
text? string The reply text.
url? string Link to the thread in the Bitbucket UI.
comments? list of object Every comment, ungrouped.
id? integer Comment identifier.
version integer Optimistic-locking version.
text? string The comment text.
state? OPEN|RESOLVED|PENDING
severity? string NORMAL for an ordinary comment, BLOCKER for a task.
pending boolean Whether this is an unpublished draft comment.
resolved boolean Whether the thread this comment belongs to is resolved.
anchored boolean Whether the comment is attached to a line rather than to the commit or
pull request.
reply boolean Whether this comment is a reply to another rather than the root of a
thread.
parentId? integer Comment this one replies to.
anchor? object Where in the diff it sits.
path? string File the comment is anchored to.
srcPath? string Path before a rename, when the file was renamed.
line? integer Line within that file.
lineType? string ADDED, REMOVED or CONTEXT.
fileType? string FROM or TO, which side of the diff the line is on.
diffType? string COMMIT, EFFECTIVE or RANGE.
fromHash? string Commit the diff was taken from.
toHash? string Commit the diff was taken to.
author? object Who wrote it.
id? integer User identifier.
name? string Username.
displayName? string Human-readable name.
emailAddress? string Email address, when the instance exposes it.
slug? string URL-safe form of the username.
type? string Account kind: NORMAL for a person, SERVICE for an integration account.
active boolean Whether the account is enabled.
replyCount integer Direct replies to this comment.
createdDate? integer When it was written, in milliseconds since the epoch.
updatedDate? integer When it last changed, in milliseconds since the epoch.
resolvedDate? integer When it was resolved, in milliseconds since the epoch.
properties? map of any Per-comment extras Bitbucket attaches, reactions among them.
bb pr comment react¶
Add or remove a reaction on a pull request comment
bb pr comment react <pr-id> <comment-id> <emoji> [flags]
# Add a thumbs-up to a comment
bb pr comment react 42 1389396 thumbsup --repo PROJ/repo
# Take it back
bb pr comment react 42 1389396 thumbsup --repo PROJ/repo --remove
--remove- Remove the reaction instead of adding it
Inherited from bb pr:
--repo string- Repository as PROJECT/slug (defaults to the repository of the git checkout you are in, then BITBUCKET_PROJECT_KEY + BITBUCKET_REPO_SLUG)
Also takes the global flags.
Dry run: Predicts the outcome from what it can read, without changing anything (predicted)
Output with --json, where ? marks a field that can be absent
data
status string Outcome of the command.
action added|removed
repository object
projectKey string Project key the repository belongs to.
slug string Repository slug.
pullRequestId string Pull request the comment belongs to.
commentId string Comment that was reacted to.
emoticon string The reaction, by name, for example thumbsup.
bb pr comment reopen¶
Reopen a resolved pull request comment
bb pr comment reopen <pr-id> <comment-id>
# Reopen a comment that was resolved
bb pr comment reopen 42 1389396 --repo PROJ/repo
Inherited from bb pr:
--repo string- Repository as PROJECT/slug (defaults to the repository of the git checkout you are in, then BITBUCKET_PROJECT_KEY + BITBUCKET_REPO_SLUG)
Also takes the global flags.
Dry run: Predicts the outcome from what it can read, without changing anything (predicted)
Output with --json, where ? marks a field that can be absent
data
repository object
projectKey string Project key the repository belongs to.
slug string Repository slug.
pullRequestId string Pull request the comment belongs to.
comment object
id? integer Comment identifier.
version integer Optimistic-locking version.
text? string The comment text.
state? OPEN|RESOLVED|PENDING
severity? string NORMAL for an ordinary comment, BLOCKER for a task.
pending boolean Whether this is an unpublished draft comment.
resolved boolean Whether the thread this comment belongs to is resolved.
anchored boolean Whether the comment is attached to a line rather than to the commit or pull
request.
reply boolean Whether this comment is a reply to another rather than the root of a thread.
parentId? integer Comment this one replies to.
anchor? object Where in the diff it sits.
path? string File the comment is anchored to.
srcPath? string Path before a rename, when the file was renamed.
line? integer Line within that file.
lineType? string ADDED, REMOVED or CONTEXT.
fileType? string FROM or TO, which side of the diff the line is on.
diffType? string COMMIT, EFFECTIVE or RANGE.
fromHash? string Commit the diff was taken from.
toHash? string Commit the diff was taken to.
author? object Who wrote it.
id? integer User identifier.
name? string Username.
displayName? string Human-readable name.
emailAddress? string Email address, when the instance exposes it.
slug? string URL-safe form of the username.
type? string Account kind: NORMAL for a person, SERVICE for an integration account.
active boolean Whether the account is enabled.
replyCount integer Direct replies to this comment.
createdDate? integer When it was written, in milliseconds since the epoch.
updatedDate? integer When it last changed, in milliseconds since the epoch.
resolvedDate? integer When it was resolved, in milliseconds since the epoch.
properties? map of any Per-comment extras Bitbucket attaches, reactions among them.
bb pr comment resolve¶
Resolve a pull request comment, closing it as a task
bb pr comment resolve <pr-id> <comment-id>
# Mark a comment or task as dealt with
bb pr comment resolve 42 1389396 --repo PROJ/repo
Inherited from bb pr:
--repo string- Repository as PROJECT/slug (defaults to the repository of the git checkout you are in, then BITBUCKET_PROJECT_KEY + BITBUCKET_REPO_SLUG)
Also takes the global flags.
Dry run: Predicts the outcome from what it can read, without changing anything (predicted)
Output with --json, where ? marks a field that can be absent
data
repository object
projectKey string Project key the repository belongs to.
slug string Repository slug.
pullRequestId string Pull request the comment belongs to.
comment object
id? integer Comment identifier.
version integer Optimistic-locking version.
text? string The comment text.
state? OPEN|RESOLVED|PENDING
severity? string NORMAL for an ordinary comment, BLOCKER for a task.
pending boolean Whether this is an unpublished draft comment.
resolved boolean Whether the thread this comment belongs to is resolved.
anchored boolean Whether the comment is attached to a line rather than to the commit or pull
request.
reply boolean Whether this comment is a reply to another rather than the root of a thread.
parentId? integer Comment this one replies to.
anchor? object Where in the diff it sits.
path? string File the comment is anchored to.
srcPath? string Path before a rename, when the file was renamed.
line? integer Line within that file.
lineType? string ADDED, REMOVED or CONTEXT.
fileType? string FROM or TO, which side of the diff the line is on.
diffType? string COMMIT, EFFECTIVE or RANGE.
fromHash? string Commit the diff was taken from.
toHash? string Commit the diff was taken to.
author? object Who wrote it.
id? integer User identifier.
name? string Username.
displayName? string Human-readable name.
emailAddress? string Email address, when the instance exposes it.
slug? string URL-safe form of the username.
type? string Account kind: NORMAL for a person, SERVICE for an integration account.
active boolean Whether the account is enabled.
replyCount integer Direct replies to this comment.
createdDate? integer When it was written, in milliseconds since the epoch.
updatedDate? integer When it last changed, in milliseconds since the epoch.
resolvedDate? integer When it was resolved, in milliseconds since the epoch.
properties? map of any Per-comment extras Bitbucket attaches, reactions among them.
bb pr commits¶
List the commits in a pull request
bb pr commits [pr-id] [flags]
# The commits a pull request would merge
bb pr commits 42 --repo PROJ/repo
--all- Return every result rather than the first --limit
--limit int- Maximum number of results to return (default 25)
--start int- Start offset for list operations
Inherited from bb pr:
--repo string- Repository as PROJECT/slug (defaults to the repository of the git checkout you are in, then BITBUCKET_PROJECT_KEY + BITBUCKET_REPO_SLUG)
Also takes the global flags.
Dry run: Runs as usual: this command changes nothing, so there is nothing to hold back
Output with --json, where ? marks a field that can be absent
data
repository object
projectKey string Project key the repository belongs to.
slug string Repository slug.
pullRequestId string Pull request the commits belong to.
commits list of object or null Commits that make up the pull request, newest first.
id? string Full 40-character SHA1.
displayId? string Abbreviated SHA1 as Bitbucket renders it.
message? string Full commit message, including the body.
author? object Who wrote the change.
name? string Display name.
emailAddress? string Email address, when the instance exposes it.
avatarUrl? string URL of the avatar image, when one is configured.
authorTimestamp? integer When the change was written, in milliseconds since the epoch.
committer? object Who committed the change.
name? string Display name.
emailAddress? string Email address, when the instance exposes it.
avatarUrl? string URL of the avatar image, when one is configured.
committerTimestamp? integer When the change was committed, in milliseconds since the epoch.
parents? list of string Commit ids of the parents.
bb pr create¶
Create a pull request
bb pr create [flags]
Run inside a checkout, bb works out what it is not told: --from-ref is the branch that is checked out, --to-ref is the repository's default branch, and --title is the subject of the branch's commit when it holds exactly one. At a terminal each is offered for you to accept or change. With nobody to ask they are used as they are, and --title is still required for a branch that holds several commits. The checked-out branch is only taken unasked when the repository itself came from the checkout rather than from --repo.
# Inside a checkout: from the checked-out branch into the repository's default branch
bb pr create
# Create a pull request (automatically includes default reviewers and CODEOWNERS)
bb pr create --repo PROJ/repo --from-ref feature/x --to-ref main --title "My change" \
--description "Why it is needed, and how to test it."
# Create a draft pull request
bb pr create --repo PROJ/repo --from-ref feature/x --to-ref main --title "My change" --draft
# Create a pull request with reviewers and reviewer groups (repeatable or comma-separated)
bb pr create --repo PROJ/repo --from-ref feature/x --to-ref main --title "My change" \
--reviewers alice,@backend-team --reviewer-group qa-team
# Create a pull request without default reviewers or CODEOWNERS
bb pr create --repo PROJ/repo --from-ref feature/x --to-ref main --title "My change" \
--no-default-reviewers --no-codeowners
# Create a pull request from a branch of a fork into the repository it was forked from
bb pr create --repo PROJ/repo --from-repo SANDBOX/repo-experiment --from-ref feature/x \
--to-ref main --title "My change"
--codeowners- Assign the code owners Bitbucket reports for the change, the same ones the web interface offers; the CODEOWNERS syntax and its meaning are the server's (default true)
--default-reviewers- Include default reviewers configured on repository/project; a failed lookup warns, unless this flag is passed explicitly, which makes it fatal (default true)
--description string- Pull request description
--draft- Create as a draft pull request
--from-ref string- Source branch (name or refs/heads/name); in a checkout, the checked-out branch
--from-repo string- Repository holding --from-ref as PROJECT/slug, for a fork to upstream pull request (defaults to --repo)
--no-codeowners- Do not assign code owners
--no-default-reviewers- Do not include default reviewers
--reviewer-group strings- Reviewer group name(s) to expand and add (repeatable or comma-separated; a leading @ and a reviewer-group/ prefix are both accepted; alias --reviewer-groups)
--reviewers strings- Reviewer usernames to add (repeatable or comma-separated, accepts @group syntax, e.g. --reviewers alice,@backend-team)
--title string- Pull request title; the commit subject when the branch holds exactly one commit
--to-ref string- Target branch (name or refs/heads/name); the repository's default branch when left out
Inherited from bb pr:
--repo string- Repository as PROJECT/slug (defaults to the repository of the git checkout you are in, then BITBUCKET_PROJECT_KEY + BITBUCKET_REPO_SLUG)
Also takes the global flags.
Dry run: Predicts the outcome from what it can read, without changing anything (predicted)
Output with --json, where ? marks a field that can be absent
data
repository object
projectKey string Project key the repository belongs to.
slug string Repository slug.
pullRequest object The pull request as it stands after the change.
id integer Pull request number, unique within the repository.
title string Pull request title.
description? string Body text, when one was written.
state OPEN|MERGED|DECLINED
open boolean Whether the pull request is still open.
closed boolean Whether the pull request is merged or declined.
draft? boolean Whether it is marked as a draft.
repository? object Repository the pull request merges into.
projectKey string Project key the repository belongs to.
slug string Repository slug.
sourceRepository? object Repository the source branch lives in.
projectKey string Project key the repository belongs to.
slug string Repository slug.
version integer Optimistic-locking version.
author? string Display name of whoever opened it.
authorUsername? string Username of whoever opened it.
sourceBranch? string Branch being merged from.
targetBranch? string Branch being merged into.
sourceCommit? string Head commit of the source branch when this was read.
createdDate? integer When it was opened, in milliseconds since the epoch.
updatedDate? integer When it last changed, in milliseconds since the epoch.
closedDate? integer When it was merged or declined, in milliseconds since the epoch.
url? string Where the pull request is in Bitbucket, as the server links to
it.
issueKeys? list of string Issue keys the title and source branch mention, such as
PROJ-123, in the order they appear.
reviewers? list of object Everyone asked to review, with where they got to.
name? string Username.
displayName? string Human-readable name.
email? string Email address, when the instance exposes it.
role? AUTHOR|REVIEWER|PARTICIPANT REVIEWER or PARTICIPANT.
status? UNAPPROVED|NEEDS_WORK|APPROVED
approved boolean Whether this reviewer has approved.
mergeability? object Whether it can merge.
mergeable boolean Whether Bitbucket would accept a merge right now.
outcome? CLEAN|CONFLICTED|UNKNOWN
conflicted boolean Whether the merge would conflict.
blockers? list of object Merge checks currently refusing.
summary? string Short reason, as Bitbucket phrases it.
detail? string Longer explanation, when the instance gives one.
commentCount? integer Comments on the pull request.
openTaskCount? integer Unresolved tasks.
resolvedTaskCount? integer Resolved tasks.
bb pr decline¶
Decline a pull request
Aliases: bb pr close
bb pr decline <pr-id> [flags]
# Decline a pull request
bb pr decline 42 --repo PROJ/repo
# Only if nobody changed it since the version you read
bb pr decline 42 --repo PROJ/repo --version 3
--version int- Expected pull request version; omit to act on whatever version is current
Inherited from bb pr:
--repo string- Repository as PROJECT/slug (defaults to the repository of the git checkout you are in, then BITBUCKET_PROJECT_KEY + BITBUCKET_REPO_SLUG)
Also takes the global flags.
Dry run: Checks your permission and the current state this depends on, without changing anything (preconditions-checked)
Output with --json, where ? marks a field that can be absent
data
repository object
projectKey string Project key the repository belongs to.
slug string Repository slug.
pullRequest object The pull request as it stands after the change.
id integer Pull request number, unique within the repository.
title string Pull request title.
description? string Body text, when one was written.
state OPEN|MERGED|DECLINED
open boolean Whether the pull request is still open.
closed boolean Whether the pull request is merged or declined.
draft? boolean Whether it is marked as a draft.
repository? object Repository the pull request merges into.
projectKey string Project key the repository belongs to.
slug string Repository slug.
sourceRepository? object Repository the source branch lives in.
projectKey string Project key the repository belongs to.
slug string Repository slug.
version integer Optimistic-locking version.
author? string Display name of whoever opened it.
authorUsername? string Username of whoever opened it.
sourceBranch? string Branch being merged from.
targetBranch? string Branch being merged into.
sourceCommit? string Head commit of the source branch when this was read.
createdDate? integer When it was opened, in milliseconds since the epoch.
updatedDate? integer When it last changed, in milliseconds since the epoch.
closedDate? integer When it was merged or declined, in milliseconds since the epoch.
url? string Where the pull request is in Bitbucket, as the server links to
it.
issueKeys? list of string Issue keys the title and source branch mention, such as
PROJ-123, in the order they appear.
reviewers? list of object Everyone asked to review, with where they got to.
name? string Username.
displayName? string Human-readable name.
email? string Email address, when the instance exposes it.
role? AUTHOR|REVIEWER|PARTICIPANT REVIEWER or PARTICIPANT.
status? UNAPPROVED|NEEDS_WORK|APPROVED
approved boolean Whether this reviewer has approved.
mergeability? object Whether it can merge.
mergeable boolean Whether Bitbucket would accept a merge right now.
outcome? CLEAN|CONFLICTED|UNKNOWN
conflicted boolean Whether the merge would conflict.
blockers? list of object Merge checks currently refusing.
summary? string Short reason, as Bitbucket phrases it.
detail? string Longer explanation, when the instance gives one.
commentCount? integer Comments on the pull request.
openTaskCount? integer Unresolved tasks.
resolvedTaskCount? integer Resolved tasks.
bb pr default-reviewers¶
List default reviewers and matching conditions for repository
bb pr default-reviewers [flags]
# Who Bitbucket would add as reviewers to a pull request from feature/x into main.
# The ids are the repository's own, which bb repo get --json prints.
bb pr default-reviewers --repo PROJ/repo \
--source-ref refs/heads/feature/x --target-ref refs/heads/main \
--source-repo-id 128 --target-repo-id 128
--source-ref string- The ID of the source ref (e.g. refs/heads/feature)
--source-repo-id string- The ID of the repository in which the source ref exists
--target-ref string- The ID of the target ref (e.g. refs/heads/master)
--target-repo-id string- The ID of the repository in which the target ref exists
Inherited from bb pr:
--repo string- Repository as PROJECT/slug (defaults to the repository of the git checkout you are in, then BITBUCKET_PROJECT_KEY + BITBUCKET_REPO_SLUG)
Also takes the global flags.
Dry run: Runs as usual: this command changes nothing, so there is nothing to hold back
Output with --json, where ? marks a field that can be absent
data
defaultReviewers list of object or null Conditions that would apply to a pull
request between the given refs.
id? integer Condition identifier, which update and
delete address.
requiredApprovals integer How many of the named reviewers must
approve before the pull request can
merge.
sourceRefMatcher? object Which source branches the condition
applies to.
id? string Matcher value: a branch name, a pattern,
or a model branch id depending on type.
displayId? string Human-readable form of the same thing.
type? ANY_REF|BRANCH|PATTERN|MODEL_BRANCH|MODEL_CATEGORY|DEFAULT_BRANCH ANY_REF, BRANCH, PATTERN, MODEL_BRANCH,
MODEL_CATEGORY or DEFAULT_BRANCH, which
decides how id is read.
targetRefMatcher? object Which target branches the condition
applies to.
id? string Matcher value: a branch name, a pattern,
or a model branch id depending on type.
displayId? string Human-readable form of the same thing.
type? ANY_REF|BRANCH|PATTERN|MODEL_BRANCH|MODEL_CATEGORY|DEFAULT_BRANCH ANY_REF, BRANCH, PATTERN, MODEL_BRANCH,
MODEL_CATEGORY or DEFAULT_BRANCH, which
decides how id is read.
reviewers? list of object Individual users added as default
reviewers.
id? integer Identifier, unique among users or among
groups.
name? string Username for a user, group name for a
group.
reviewerGroups? list of object Groups added as default reviewers.
id? integer Identifier, unique among users or among
groups.
name? string Username for a user, group name for a
group.
scope? PROJECT|REPOSITORY PROJECT when the condition is inherited
from the project, REPOSITORY when it is
set on the repository itself.
bb pr diff¶
Diff a pull request (alias for bb diff pr)
bb pr diff [pr-id] [flags]
Diff a pull request.
Alias for bb diff pr, which is where the command reference documents it.
# The diff of a pull request
bb pr diff 42 --repo PROJ/repo
# Only the names of the files it changes
bb pr diff 42 --repo PROJ/repo --name-only
# As a patch, saved to a file
bb pr diff 42 --repo PROJ/repo --patch > pr-42.patch
--name-only- Output only changed file names
--patch- Output unified patch stream
--stat- Output structured diff stats
Inherited from bb pr:
--repo string- Repository as PROJECT/slug (defaults to the repository of the git checkout you are in, then BITBUCKET_PROJECT_KEY + BITBUCKET_REPO_SLUG)
Also takes the global flags.
Dry run: Runs as usual: this command changes nothing, so there is nothing to hold back
Output with --json, where ? marks a field that can be absent
data
repository object
projectKey string Project key the repository belongs to.
slug string Repository slug.
output patch|stat|name-only Which form was produced: patch, stat or name-only.
patch? string The unified diff, when output is patch.
names? list of string Paths that differ, when output is name-only.
stats? map of any Per-file addition and deletion counts, when output is stat.
bb pr files¶
List the files changed in a pull request
Aliases: bb pr changes
bb pr files [pr-id] [flags]
# The files a pull request changes
bb pr files 42 --repo PROJ/repo
--all- Return every result rather than the first --limit
--limit int- Maximum number of results to return (default 25)
--start int- Start offset for list operations
Inherited from bb pr:
--repo string- Repository as PROJECT/slug (defaults to the repository of the git checkout you are in, then BITBUCKET_PROJECT_KEY + BITBUCKET_REPO_SLUG)
Also takes the global flags.
Dry run: Runs as usual: this command changes nothing, so there is nothing to hold back
Output with --json, where ? marks a field that can be absent
data
repository object
projectKey string Project key the repository belongs to.
slug string Repository slug.
pullRequestId string Pull request the changes belong to.
changes list of object or null Files changed.
path string Path after the change.
srcPath? string Path before a rename or copy.
type? string ADD, MODIFY, DELETE, COPY, MOVE or UNKNOWN.
nodeType? string FILE, DIRECTORY or SUBMODULE.
executable? boolean Whether the file is executable after the change.
bb pr get¶
Get pull request details, including outstanding review feedback
Aliases: bb pr view
bb pr get [pr-id] [flags]
Get pull request details. The output carries a review summary describing unresolved comment threads, open tasks and reviewers who requested changes, so outstanding feedback is visible without a separate lookup.
The unresolved thread counts come from the activity timeline, which is paged through; pass --no-review-summary to skip it. When the timeline is unavailable the summary falls back to the blocker-comment tally, then to the counters Bitbucket ships with the pull request. reviewSummary.countsSource reports which was used.
# A pull request, with what is still outstanding on it
bb pr get 42 --repo PROJ/repo
# Inside a checkout: the open pull request of the checked-out branch
bb pr view
# Without counting the unresolved threads, which is quicker
bb pr get 42 --repo PROJ/repo --no-review-summary
--no-review-summary- Skip the paged activity timeline walk; the summary still carries the open task tally, which costs one request
Inherited from bb pr:
--repo string- Repository as PROJECT/slug (defaults to the repository of the git checkout you are in, then BITBUCKET_PROJECT_KEY + BITBUCKET_REPO_SLUG)
Also takes the global flags.
Dry run: Runs as usual: this command changes nothing, so there is nothing to hold back
Output with --json, where ? marks a field that can be absent
data
repository object
projectKey string Project key the repository belongs to.
slug string Repository slug.
pullRequest object
id integer Pull request number, unique within the repository.
title string Pull request title.
description? string Body text, when one was written.
state OPEN|MERGED|DECLINED
open boolean Whether the pull request is still open.
closed boolean Whether the pull request is merged or declined.
draft? boolean Whether it is marked as a draft.
repository? object Repository the pull request merges into.
projectKey string Project key the repository belongs to.
slug string Repository slug.
sourceRepository? object Repository the source branch lives in.
projectKey string Project key the repository belongs to.
slug string Repository slug.
version integer Optimistic-locking version.
author? string Display name of whoever opened it.
authorUsername? string Username of whoever opened it.
sourceBranch? string Branch being merged from.
targetBranch? string Branch being merged into.
sourceCommit? string Head commit of the source branch when this was
read.
createdDate? integer When it was opened, in milliseconds since the
epoch.
updatedDate? integer When it last changed, in milliseconds since the
epoch.
closedDate? integer When it was merged or declined, in milliseconds
since the epoch.
url? string Where the pull request is in Bitbucket, as the
server links to it.
issueKeys? list of string Issue keys the title and source branch mention,
such as PROJ-123, in the order they appear.
reviewers? list of object Everyone asked to review, with where they got to.
name? string Username.
displayName? string Human-readable name.
email? string Email address, when the instance exposes it.
role? AUTHOR|REVIEWER|PARTICIPANT REVIEWER or PARTICIPANT.
status? UNAPPROVED|NEEDS_WORK|APPROVED
approved boolean Whether this reviewer has approved.
mergeability? object Whether it can merge.
mergeable boolean Whether Bitbucket would accept a merge right now.
outcome? CLEAN|CONFLICTED|UNKNOWN
conflicted boolean Whether the merge would conflict.
blockers? list of object Merge checks currently refusing.
summary? string Short reason, as Bitbucket phrases it.
detail? string Longer explanation, when the instance gives one.
commentCount? integer Comments on the pull request.
openTaskCount? integer Unresolved tasks.
resolvedTaskCount? integer Resolved tasks.
reviewSummary object Outstanding review feedback, so it is visible
without a second lookup.
actionRequired? boolean True when the pull request is waiting on someone:
an unresolved thread, an open task, or a reviewer
who requested changes.
unresolvedThreads? integer Threads still open, tasks included.
openTasks? integer The subset of unresolvedThreads that blocks the
merge.
resolvedThreads? integer Threads that have been resolved.
resolvedTasks? integer Tasks that have been resolved.
pendingComments? integer The author's own unpublished draft comments.
needsWork? list of string Reviewers who requested changes.
approvals integer How many reviewers have approved.
reviewers integer How many reviewers are named.
commentCount? integer Bitbucket's raw comment counter.
countsSource activities|blocker_comments|properties|none Where the counts came from: activities for the
timeline walk, blocker_comments for the task tally,
properties for the counters shipped with the pull
request, or none when nothing could be measured.
bb pr jira¶
List Jira issues associated with a pull request
bb pr jira [pr-id]
# The Jira issues a pull request refers to
bb pr jira 42 --repo PROJ/repo
Inherited from bb pr:
--repo string- Repository as PROJECT/slug (defaults to the repository of the git checkout you are in, then BITBUCKET_PROJECT_KEY + BITBUCKET_REPO_SLUG)
Also takes the global flags.
Dry run: Runs as usual: this command changes nothing, so there is nothing to hold back
Output with --json, where ? marks a field that can be absent
data
repository object
projectKey string Project key the repository belongs to.
slug string Repository slug.
pullRequestId string Pull request the issues are linked to.
issues list of object or null Linked Jira issues.
key string Issue key, for example PROJ-123.
url? string Link to the issue, when the instance reports one.
bb pr list¶
List pull requests
bb pr list [flags]
List pull requests. Each entry carries the open task and comment counters Bitbucket reports with the pull request, so pull requests with outstanding feedback stand out. Pass --with-review-status to additionally resolve unresolved comment threads per pull request. That walks each pull request activity timeline, so it is markedly slower on a long listing.
# The open pull requests of a repository
bb pr list --repo PROJ/repo
# Merged into main
bb pr list --repo PROJ/repo --state merged --target-branch main
# Whatever was opened from a branch, open or not
bb pr list --repo PROJ/repo --source-branch feature/x --state all
# Open ones, with the unresolved threads of each counted
bb pr list --repo PROJ/repo --with-review-status
--all- Return every result rather than the first --limit
--limit int- Maximum number of results to return (default 25)
--source-branch string- Optional source branch filter
--start int- Start offset for list operations
--state string- Pull request state filter (one of: open, merged, declined, closed, all) (default "open")
--target-branch string- Optional target branch filter
--with-review-status- Resolve unresolved comment threads per pull request (walks each activity timeline; slower)
Inherited from bb pr:
--repo string- Repository as PROJECT/slug (defaults to the repository of the git checkout you are in, then BITBUCKET_PROJECT_KEY + BITBUCKET_REPO_SLUG)
Also takes the global flags.
Dry run: Runs as usual: this command changes nothing, so there is nothing to hold back
Output with --json, where ? marks a field that can be absent
data
repository object
projectKey string Project key the repository belongs to.
slug string Repository slug.
filters object
state? open|merged|declined|closed|all State filter the listing was narrowed by.
start integer Offset the page started at.
limit integer Maximum entries requested.
sourceBranch? string Source branch filter, when one was given.
targetBranch? string Target branch filter, when one was given.
pullRequests list of object or null Matching pull requests.
id integer Pull request number, unique within the repository.
title string Pull request title.
description? string Body text, when one was written.
state OPEN|MERGED|DECLINED
open boolean Whether the pull request is still open.
closed boolean Whether the pull request is merged or declined.
draft? boolean Whether it is marked as a draft.
repository? object Repository the pull request merges into.
projectKey string Project key the repository belongs to.
slug string Repository slug.
sourceRepository? object Repository the source branch lives in.
projectKey string Project key the repository belongs to.
slug string Repository slug.
version integer Optimistic-locking version.
author? string Display name of whoever opened it.
authorUsername? string Username of whoever opened it.
sourceBranch? string Branch being merged from.
targetBranch? string Branch being merged into.
sourceCommit? string Head commit of the source branch when this was
read.
createdDate? integer When it was opened, in milliseconds since the
epoch.
updatedDate? integer When it last changed, in milliseconds since the
epoch.
closedDate? integer When it was merged or declined, in milliseconds
since the epoch.
url? string Where the pull request is in Bitbucket, as the
server links to it.
issueKeys? list of string Issue keys the title and source branch mention,
such as PROJ-123, in the order they appear.
reviewers? list of object Everyone asked to review, with where they got to.
name? string Username.
displayName? string Human-readable name.
email? string Email address, when the instance exposes it.
role? AUTHOR|REVIEWER|PARTICIPANT REVIEWER or PARTICIPANT.
status? UNAPPROVED|NEEDS_WORK|APPROVED
approved boolean Whether this reviewer has approved.
mergeability? object Whether it can merge.
mergeable boolean Whether Bitbucket would accept a merge right now.
outcome? CLEAN|CONFLICTED|UNKNOWN
conflicted boolean Whether the merge would conflict.
blockers? list of object Merge checks currently refusing.
summary? string Short reason, as Bitbucket phrases it.
detail? string Longer explanation, when the instance gives one.
commentCount? integer Comments on the pull request.
openTaskCount? integer Unresolved tasks.
resolvedTaskCount? integer Resolved tasks.
reviewSummaries? list of object One summary per pull request, in the same order.
actionRequired? boolean True when the pull request is waiting on someone:
an unresolved thread, an open task, or a reviewer
who requested changes.
unresolvedThreads? integer Threads still open, tasks included.
openTasks? integer The subset of unresolvedThreads that blocks the
merge.
resolvedThreads? integer Threads that have been resolved.
resolvedTasks? integer Tasks that have been resolved.
pendingComments? integer The author's own unpublished draft comments.
needsWork? list of string Reviewers who requested changes.
approvals integer How many reviewers have approved.
reviewers integer How many reviewers are named.
commentCount? integer Bitbucket's raw comment counter.
countsSource activities|blocker_comments|properties|none Where the counts came from: activities for the
timeline walk, blocker_comments for the task tally,
properties for the counters shipped with the pull
request, or none when nothing could be measured.
bb pr merge¶
Merge a pull request
bb pr merge <pr-id> [flags]
# Merge with the repository's default strategy
bb pr merge 42 --repo PROJ/repo
# Squash, and only if nobody changed it since the version you read
bb pr merge 42 --repo PROJ/repo --strategy squash --version 3
--strategy string- How to merge; omit for the repository's default. Bitbucket refuses one the repository has not enabled (one of: no-ff, ff, ff-only, rebase-no-ff, rebase-ff-only, squash, squash-ff-only)
--version int- Expected pull request version; omit to act on whatever version is current
Inherited from bb pr:
--repo string- Repository as PROJECT/slug (defaults to the repository of the git checkout you are in, then BITBUCKET_PROJECT_KEY + BITBUCKET_REPO_SLUG)
Also takes the global flags.
Dry run: Checks your permission and the current state this depends on, without changing anything (preconditions-checked)
Output with --json, where ? marks a field that can be absent
data
repository object
projectKey string Project key the repository belongs to.
slug string Repository slug.
pullRequest object The pull request as it stands after the change.
id integer Pull request number, unique within the repository.
title string Pull request title.
description? string Body text, when one was written.
state OPEN|MERGED|DECLINED
open boolean Whether the pull request is still open.
closed boolean Whether the pull request is merged or declined.
draft? boolean Whether it is marked as a draft.
repository? object Repository the pull request merges into.
projectKey string Project key the repository belongs to.
slug string Repository slug.
sourceRepository? object Repository the source branch lives in.
projectKey string Project key the repository belongs to.
slug string Repository slug.
version integer Optimistic-locking version.
author? string Display name of whoever opened it.
authorUsername? string Username of whoever opened it.
sourceBranch? string Branch being merged from.
targetBranch? string Branch being merged into.
sourceCommit? string Head commit of the source branch when this was read.
createdDate? integer When it was opened, in milliseconds since the epoch.
updatedDate? integer When it last changed, in milliseconds since the epoch.
closedDate? integer When it was merged or declined, in milliseconds since the epoch.
url? string Where the pull request is in Bitbucket, as the server links to
it.
issueKeys? list of string Issue keys the title and source branch mention, such as
PROJ-123, in the order they appear.
reviewers? list of object Everyone asked to review, with where they got to.
name? string Username.
displayName? string Human-readable name.
email? string Email address, when the instance exposes it.
role? AUTHOR|REVIEWER|PARTICIPANT REVIEWER or PARTICIPANT.
status? UNAPPROVED|NEEDS_WORK|APPROVED
approved boolean Whether this reviewer has approved.
mergeability? object Whether it can merge.
mergeable boolean Whether Bitbucket would accept a merge right now.
outcome? CLEAN|CONFLICTED|UNKNOWN
conflicted boolean Whether the merge would conflict.
blockers? list of object Merge checks currently refusing.
summary? string Short reason, as Bitbucket phrases it.
detail? string Longer explanation, when the instance gives one.
commentCount? integer Comments on the pull request.
openTaskCount? integer Unresolved tasks.
resolvedTaskCount? integer Resolved tasks.
bb pr merge-base¶
Show the common ancestor commit of a pull request's source and target branches
bb pr merge-base [pr-id]
# The commit a pull request's branches last had in common
bb pr merge-base 42 --repo PROJ/repo
Inherited from bb pr:
--repo string- Repository as PROJECT/slug (defaults to the repository of the git checkout you are in, then BITBUCKET_PROJECT_KEY + BITBUCKET_REPO_SLUG)
Also takes the global flags.
Dry run: Runs as usual: this command changes nothing, so there is nothing to hold back
Output with --json, where ? marks a field that can be absent
data
repository object
projectKey string Project key the repository belongs to.
slug string Repository slug.
pullRequestId string Pull request the merge base was computed for.
mergeBase object The commit the source and target branches last shared.
id? string Full 40-character SHA1.
displayId? string Abbreviated SHA1 as Bitbucket renders it.
message? string Full commit message, including the body.
author? object Who wrote the change.
name? string Display name.
emailAddress? string Email address, when the instance exposes it.
avatarUrl? string URL of the avatar image, when one is configured.
authorTimestamp? integer When the change was written, in milliseconds since the epoch.
committer? object Who committed the change.
name? string Display name.
emailAddress? string Email address, when the instance exposes it.
avatarUrl? string URL of the avatar image, when one is configured.
committerTimestamp? integer When the change was committed, in milliseconds since the epoch.
parents? list of string Commit ids of the parents.
bb pr participants¶
Search pull request participants across a repository
bb pr participants [flags]
# People who took part in the repository's pull requests, by name
bb pr participants --search alice --repo PROJ/repo
--search string- Query filter (checks username, name, or email)
Inherited from bb pr:
--repo string- Repository as PROJECT/slug (defaults to the repository of the git checkout you are in, then BITBUCKET_PROJECT_KEY + BITBUCKET_REPO_SLUG)
Also takes the global flags.
Dry run: Runs as usual: this command changes nothing, so there is nothing to hold back
Output with --json, where ? marks a field that can be absent
data
repository object
projectKey string Project key the repository belongs to.
slug string Repository slug.
participants list of object or null People who have taken part in a pull request in this repository.
name string Username.
displayName? string Human-readable name.
emailAddress? string Email address, when the instance exposes it.
active boolean Whether the account is enabled.
bb pr ready¶
Mark a draft pull request ready for review, or turn it back into a draft
bb pr ready <pr-id> [flags]
Mark a draft pull request ready for review. With --undo, turn an open pull request back into a draft.
bb reads the pull request's current version itself. If the pull request changes between that read and the update, so that Bitbucket refuses the version as out of date, bb reads it again and retries once.
A pull request already in the requested state is left as it is, and the command succeeds saying nothing changed. A merged or declined pull request is refused: only an open one can be marked ready or turned into a draft.
bb pr update --draft sets the same flag alongside other fields, and takes --version for a caller who wants the change refused if the pull request has moved on since they read it.
# Mark a draft pull request ready for review
bb pr ready 42 --repo PROJ/repo
# Turn it back into a draft
bb pr ready 42 --repo PROJ/repo --undo
--undo- Turn the pull request back into a draft instead
Inherited from bb pr:
--repo string- Repository as PROJECT/slug (defaults to the repository of the git checkout you are in, then BITBUCKET_PROJECT_KEY + BITBUCKET_REPO_SLUG)
Also takes the global flags.
Dry run: Checks your permission and the current state this depends on, without changing anything (preconditions-checked)
Output with --json, where ? marks a field that can be absent
data
repository object
projectKey string Project key the repository belongs to.
slug string Repository slug.
pullRequest object The pull request as it stands after the command.
id integer Pull request number, unique within the repository.
title string Pull request title.
description? string Body text, when one was written.
state OPEN|MERGED|DECLINED
open boolean Whether the pull request is still open.
closed boolean Whether the pull request is merged or declined.
draft? boolean Whether it is marked as a draft.
repository? object Repository the pull request merges into.
projectKey string Project key the repository belongs to.
slug string Repository slug.
sourceRepository? object Repository the source branch lives in.
projectKey string Project key the repository belongs to.
slug string Repository slug.
version integer Optimistic-locking version.
author? string Display name of whoever opened it.
authorUsername? string Username of whoever opened it.
sourceBranch? string Branch being merged from.
targetBranch? string Branch being merged into.
sourceCommit? string Head commit of the source branch when this was read.
createdDate? integer When it was opened, in milliseconds since the epoch.
updatedDate? integer When it last changed, in milliseconds since the epoch.
closedDate? integer When it was merged or declined, in milliseconds since the epoch.
url? string Where the pull request is in Bitbucket, as the server links to
it.
issueKeys? list of string Issue keys the title and source branch mention, such as
PROJ-123, in the order they appear.
reviewers? list of object Everyone asked to review, with where they got to.
name? string Username.
displayName? string Human-readable name.
email? string Email address, when the instance exposes it.
role? AUTHOR|REVIEWER|PARTICIPANT REVIEWER or PARTICIPANT.
status? UNAPPROVED|NEEDS_WORK|APPROVED
approved boolean Whether this reviewer has approved.
mergeability? object Whether it can merge.
mergeable boolean Whether Bitbucket would accept a merge right now.
outcome? CLEAN|CONFLICTED|UNKNOWN
conflicted boolean Whether the merge would conflict.
blockers? list of object Merge checks currently refusing.
summary? string Short reason, as Bitbucket phrases it.
detail? string Longer explanation, when the instance gives one.
commentCount? integer Comments on the pull request.
openTaskCount? integer Unresolved tasks.
resolvedTaskCount? integer Resolved tasks.
changed boolean Whether the draft state was changed.
bb pr rebase¶
Rebase a pull request
bb pr rebase <pr-id> [flags]
# Rebase a pull request's branch onto its target
bb pr rebase 42 --repo PROJ/repo
--version int- Expected pull request version
Inherited from bb pr:
--repo string- Repository as PROJECT/slug (defaults to the repository of the git checkout you are in, then BITBUCKET_PROJECT_KEY + BITBUCKET_REPO_SLUG)
Also takes the global flags.
Dry run: Checks your permission and the current state this depends on, without changing anything (preconditions-checked)
Output with --json, where ? marks a field that can be absent
data
repository object
projectKey string Project key the repository belongs to.
slug string Repository slug.
ref? object The source branch that was rebased.
id? string Full ref name, for example refs/heads/main.
displayId? string Short ref name, for example main.
type? BRANCH|TAG
fromHash? string Commit the branch pointed at before the rebase.
toHash? string Commit it points at now.
bb pr reopen¶
Reopen a pull request
bb pr reopen <pr-id> [flags]
# Reopen a declined pull request
bb pr reopen 42 --repo PROJ/repo
--version int- Expected pull request version; omit to act on whatever version is current
Inherited from bb pr:
--repo string- Repository as PROJECT/slug (defaults to the repository of the git checkout you are in, then BITBUCKET_PROJECT_KEY + BITBUCKET_REPO_SLUG)
Also takes the global flags.
Dry run: Checks your permission and the current state this depends on, without changing anything (preconditions-checked)
Output with --json, where ? marks a field that can be absent
data
repository object
projectKey string Project key the repository belongs to.
slug string Repository slug.
pullRequest object The pull request as it stands after the change.
id integer Pull request number, unique within the repository.
title string Pull request title.
description? string Body text, when one was written.
state OPEN|MERGED|DECLINED
open boolean Whether the pull request is still open.
closed boolean Whether the pull request is merged or declined.
draft? boolean Whether it is marked as a draft.
repository? object Repository the pull request merges into.
projectKey string Project key the repository belongs to.
slug string Repository slug.
sourceRepository? object Repository the source branch lives in.
projectKey string Project key the repository belongs to.
slug string Repository slug.
version integer Optimistic-locking version.
author? string Display name of whoever opened it.
authorUsername? string Username of whoever opened it.
sourceBranch? string Branch being merged from.
targetBranch? string Branch being merged into.
sourceCommit? string Head commit of the source branch when this was read.
createdDate? integer When it was opened, in milliseconds since the epoch.
updatedDate? integer When it last changed, in milliseconds since the epoch.
closedDate? integer When it was merged or declined, in milliseconds since the epoch.
url? string Where the pull request is in Bitbucket, as the server links to
it.
issueKeys? list of string Issue keys the title and source branch mention, such as
PROJ-123, in the order they appear.
reviewers? list of object Everyone asked to review, with where they got to.
name? string Username.
displayName? string Human-readable name.
email? string Email address, when the instance exposes it.
role? AUTHOR|REVIEWER|PARTICIPANT REVIEWER or PARTICIPANT.
status? UNAPPROVED|NEEDS_WORK|APPROVED
approved boolean Whether this reviewer has approved.
mergeability? object Whether it can merge.
mergeable boolean Whether Bitbucket would accept a merge right now.
outcome? CLEAN|CONFLICTED|UNKNOWN
conflicted boolean Whether the merge would conflict.
blockers? list of object Merge checks currently refusing.
summary? string Short reason, as Bitbucket phrases it.
detail? string Longer explanation, when the instance gives one.
commentCount? integer Comments on the pull request.
openTaskCount? integer Unresolved tasks.
resolvedTaskCount? integer Resolved tasks.
bb pr review¶
Approve or request changes, and publish or discard a review
approve- Approve a pull request
complete- Publish draft comments and optionally submit a status change
discard- Discard all draft comments and cancel review
get- Retrieve current draft review details
reviewer add- Add reviewers to a pull request
reviewer remove- Remove a reviewer
set- Set your review status on a pull request
unapprove- Clear your review status on a pull request
bb pr review approve¶
Approve a pull request
bb pr review approve <pr-id>
Shorthand for bb pr review set <pr-id> APPROVED. A participant holds one status, so approving replaces a request for changes rather than joining it.
# Approve a pull request
bb pr review approve 42 --repo PROJ/repo
Inherited from bb pr:
--repo string- Repository as PROJECT/slug (defaults to the repository of the git checkout you are in, then BITBUCKET_PROJECT_KEY + BITBUCKET_REPO_SLUG)
Also takes the global flags.
Dry run: Checks your permission and the current state this depends on, without changing anything (preconditions-checked)
Output with --json, where ? marks a field that can be absent
data
repository object
projectKey string Project key the repository belongs to.
slug string Repository slug.
pullRequest object The pull request as it stands after the change.
id integer Pull request number, unique within the repository.
title string Pull request title.
description? string Body text, when one was written.
state OPEN|MERGED|DECLINED
open boolean Whether the pull request is still open.
closed boolean Whether the pull request is merged or declined.
draft? boolean Whether it is marked as a draft.
repository? object Repository the pull request merges into.
projectKey string Project key the repository belongs to.
slug string Repository slug.
sourceRepository? object Repository the source branch lives in.
projectKey string Project key the repository belongs to.
slug string Repository slug.
version integer Optimistic-locking version.
author? string Display name of whoever opened it.
authorUsername? string Username of whoever opened it.
sourceBranch? string Branch being merged from.
targetBranch? string Branch being merged into.
sourceCommit? string Head commit of the source branch when this was read.
createdDate? integer When it was opened, in milliseconds since the epoch.
updatedDate? integer When it last changed, in milliseconds since the epoch.
closedDate? integer When it was merged or declined, in milliseconds since the epoch.
url? string Where the pull request is in Bitbucket, as the server links to
it.
issueKeys? list of string Issue keys the title and source branch mention, such as
PROJ-123, in the order they appear.
reviewers? list of object Everyone asked to review, with where they got to.
name? string Username.
displayName? string Human-readable name.
email? string Email address, when the instance exposes it.
role? AUTHOR|REVIEWER|PARTICIPANT REVIEWER or PARTICIPANT.
status? UNAPPROVED|NEEDS_WORK|APPROVED
approved boolean Whether this reviewer has approved.
mergeability? object Whether it can merge.
mergeable boolean Whether Bitbucket would accept a merge right now.
outcome? CLEAN|CONFLICTED|UNKNOWN
conflicted boolean Whether the merge would conflict.
blockers? list of object Merge checks currently refusing.
summary? string Short reason, as Bitbucket phrases it.
detail? string Longer explanation, when the instance gives one.
commentCount? integer Comments on the pull request.
openTaskCount? integer Unresolved tasks.
resolvedTaskCount? integer Resolved tasks.
bb pr review complete¶
Publish draft comments and optionally submit a status change
bb pr review complete <pr-id> [flags]
Publish your draft review on a pull request: the comments you added with bb pr comment add --pending, together with the status and summary comment given by --status and --comment.
Bitbucket completes only a review that was started, so this needs at least one draft comment. Without one it fails and changes nothing. To set a status on its own, use bb pr review set; to post a comment on its own, use bb pr comment add.
# Publish your draft comments
bb pr review complete 42 --repo PROJ/repo
# Publish them with a request for changes and a summary comment
bb pr review complete 42 --repo PROJ/repo --status NEEDS_WORK --comment "Unit tests fail"
--comment string- Review completion comment text
--status string- Pull request status change (one of: APPROVED, NEEDS_WORK, UNAPPROVED)
Inherited from bb pr:
--repo string- Repository as PROJECT/slug (defaults to the repository of the git checkout you are in, then BITBUCKET_PROJECT_KEY + BITBUCKET_REPO_SLUG)
Also takes the global flags.
Dry run: Checks your permission and the current state this depends on, without changing anything (preconditions-checked)
Output with --json, where ? marks a field that can be absent
data
status string Outcome of the command.
repository object
projectKey string Project key the repository belongs to.
slug string Repository slug.
pullRequestId string Pull request whose draft review was acted on.
review completed completed when the draft was published, discarded when it was thrown away.
bb pr review discard¶
Discard all draft comments and cancel review
bb pr review discard <pr-id>
# Throw away the draft comments of a review you have not published
bb pr review discard 42 --repo PROJ/repo
Inherited from bb pr:
--repo string- Repository as PROJECT/slug (defaults to the repository of the git checkout you are in, then BITBUCKET_PROJECT_KEY + BITBUCKET_REPO_SLUG)
Also takes the global flags.
Dry run: Predicts the outcome from what it can read, without changing anything (predicted)
Output with --json, where ? marks a field that can be absent
data
status string Outcome of the command.
repository object
projectKey string Project key the repository belongs to.
slug string Repository slug.
pullRequestId string Pull request whose draft review was acted on.
review discarded completed when the draft was published, discarded when it was thrown away.
bb pr review get¶
Retrieve current draft review details
bb pr review get [pr-id]
# The draft comments of a review you have not published yet
bb pr review get 42 --repo PROJ/repo
Inherited from bb pr:
--repo string- Repository as PROJECT/slug (defaults to the repository of the git checkout you are in, then BITBUCKET_PROJECT_KEY + BITBUCKET_REPO_SLUG)
Also takes the global flags.
Dry run: Runs as usual: this command changes nothing, so there is nothing to hold back
Output with --json, where ? marks a field that can be absent
data
repository object
projectKey string Project key the repository belongs to.
slug string Repository slug.
pullRequestId string Pull request the draft belongs to.
comments list of object or null Unpublished draft comments.
id? integer Comment identifier.
version integer Optimistic-locking version.
text? string The comment text.
state? OPEN|RESOLVED|PENDING
severity? string NORMAL for an ordinary comment, BLOCKER for a task.
pending boolean Whether this is an unpublished draft comment.
resolved boolean Whether the thread this comment belongs to is resolved.
anchored boolean Whether the comment is attached to a line rather than to the commit or pull
request.
reply boolean Whether this comment is a reply to another rather than the root of a
thread.
parentId? integer Comment this one replies to.
anchor? object Where in the diff it sits.
path? string File the comment is anchored to.
srcPath? string Path before a rename, when the file was renamed.
line? integer Line within that file.
lineType? string ADDED, REMOVED or CONTEXT.
fileType? string FROM or TO, which side of the diff the line is on.
diffType? string COMMIT, EFFECTIVE or RANGE.
fromHash? string Commit the diff was taken from.
toHash? string Commit the diff was taken to.
author? object Who wrote it.
id? integer User identifier.
name? string Username.
displayName? string Human-readable name.
emailAddress? string Email address, when the instance exposes it.
slug? string URL-safe form of the username.
type? string Account kind: NORMAL for a person, SERVICE for an integration account.
active boolean Whether the account is enabled.
replyCount integer Direct replies to this comment.
createdDate? integer When it was written, in milliseconds since the epoch.
updatedDate? integer When it last changed, in milliseconds since the epoch.
resolvedDate? integer When it was resolved, in milliseconds since the epoch.
properties? map of any Per-comment extras Bitbucket attaches, reactions among them.
bb pr review reviewer¶
Add or remove a pull request's reviewers
bb pr review reviewer add¶
Add reviewers to a pull request
bb pr review reviewer add <pr-id> [flags]
# Add a single reviewer
bb pr review reviewer add 42 --repo PROJ/repo --user alice
# Add multiple reviewers (repeatable or comma-separated)
bb pr review reviewer add 42 --repo PROJ/repo --user alice --user bob
bb pr review reviewer add 42 --repo PROJ/repo --users alice,bob
# Add a reviewer group
bb pr review reviewer add 42 --repo PROJ/repo --reviewer-group core-team
bb pr review reviewer add 42 --repo PROJ/repo --user @core-team
# Add default reviewers configured on repository/project
bb pr review reviewer add 42 --repo PROJ/repo --default-reviewers
# Add reviewers matching .bitbucket/CODEOWNERS
bb pr review reviewer add 42 --repo PROJ/repo --codeowners
--codeowners- Assign the code owners Bitbucket reports for the change, the same ones the web interface offers; the CODEOWNERS syntax and its meaning are the server's
--default-reviewers- Assign default reviewers configured on repository/project for this pull request
--reviewer-group strings- Reviewer group name(s) to expand and add (repeatable or comma-separated; a leading @ and a reviewer-group/ prefix are both accepted; alias --reviewer-groups)
--user strings- Reviewer username(s) (repeatable or comma-separated, accepts @group syntax; aliases --users, --reviewers)
Inherited from bb pr:
--repo string- Repository as PROJECT/slug (defaults to the repository of the git checkout you are in, then BITBUCKET_PROJECT_KEY + BITBUCKET_REPO_SLUG)
Also takes the global flags.
Dry run: Predicts the outcome from what it can read, without changing anything (predicted)
Output with --json, where ? marks a field that can be absent
data
repository object
projectKey string Project key the repository belongs to.
slug string Repository slug.
pullRequest object
id integer Pull request number, unique within the repository.
title string Pull request title.
description? string Body text, when one was written.
state OPEN|MERGED|DECLINED
open boolean Whether the pull request is still open.
closed boolean Whether the pull request is merged or declined.
draft? boolean Whether it is marked as a draft.
repository? object Repository the pull request merges into.
projectKey string Project key the repository belongs to.
slug string Repository slug.
sourceRepository? object Repository the source branch lives in.
projectKey string Project key the repository belongs to.
slug string Repository slug.
version integer Optimistic-locking version.
author? string Display name of whoever opened it.
authorUsername? string Username of whoever opened it.
sourceBranch? string Branch being merged from.
targetBranch? string Branch being merged into.
sourceCommit? string Head commit of the source branch when this was read.
createdDate? integer When it was opened, in milliseconds since the epoch.
updatedDate? integer When it last changed, in milliseconds since the epoch.
closedDate? integer When it was merged or declined, in milliseconds since the epoch.
url? string Where the pull request is in Bitbucket, as the server links to
it.
issueKeys? list of string Issue keys the title and source branch mention, such as
PROJ-123, in the order they appear.
reviewers? list of object Everyone asked to review, with where they got to.
name? string Username.
displayName? string Human-readable name.
email? string Email address, when the instance exposes it.
role? AUTHOR|REVIEWER|PARTICIPANT REVIEWER or PARTICIPANT.
status? UNAPPROVED|NEEDS_WORK|APPROVED
approved boolean Whether this reviewer has approved.
mergeability? object Whether it can merge.
mergeable boolean Whether Bitbucket would accept a merge right now.
outcome? CLEAN|CONFLICTED|UNKNOWN
conflicted boolean Whether the merge would conflict.
blockers? list of object Merge checks currently refusing.
summary? string Short reason, as Bitbucket phrases it.
detail? string Longer explanation, when the instance gives one.
commentCount? integer Comments on the pull request.
openTaskCount? integer Unresolved tasks.
resolvedTaskCount? integer Resolved tasks.
added list of string or null Usernames added as reviewers by this call.
skippedAuthor list of string or null Usernames skipped because they opened the pull request.
alreadyPresent list of string or null Usernames that were already reviewers, so nothing changed for
them.
bb pr review reviewer remove¶
Remove a reviewer
bb pr review reviewer remove <pr-id> [flags]
# Take someone off a pull request's reviewers
bb pr review reviewer remove 42 --user alice --repo PROJ/repo
--user string- Reviewer username
-y, --yes- Confirm without being asked; applies only when the target is named with --repo PROJECT/slug
Inherited from bb pr:
--repo string- Repository as PROJECT/slug (defaults to the repository of the git checkout you are in, then BITBUCKET_PROJECT_KEY + BITBUCKET_REPO_SLUG)
Also takes the global flags.
Dry run: Checks your permission and the current state this depends on, without changing anything (preconditions-checked)
Output with --json, where ? marks a field that can be absent
data
repository object
projectKey string Project key the repository belongs to.
slug string Repository slug.
pullRequest object The pull request as it stands after the change.
id integer Pull request number, unique within the repository.
title string Pull request title.
description? string Body text, when one was written.
state OPEN|MERGED|DECLINED
open boolean Whether the pull request is still open.
closed boolean Whether the pull request is merged or declined.
draft? boolean Whether it is marked as a draft.
repository? object Repository the pull request merges into.
projectKey string Project key the repository belongs to.
slug string Repository slug.
sourceRepository? object Repository the source branch lives in.
projectKey string Project key the repository belongs to.
slug string Repository slug.
version integer Optimistic-locking version.
author? string Display name of whoever opened it.
authorUsername? string Username of whoever opened it.
sourceBranch? string Branch being merged from.
targetBranch? string Branch being merged into.
sourceCommit? string Head commit of the source branch when this was read.
createdDate? integer When it was opened, in milliseconds since the epoch.
updatedDate? integer When it last changed, in milliseconds since the epoch.
closedDate? integer When it was merged or declined, in milliseconds since the epoch.
url? string Where the pull request is in Bitbucket, as the server links to
it.
issueKeys? list of string Issue keys the title and source branch mention, such as
PROJ-123, in the order they appear.
reviewers? list of object Everyone asked to review, with where they got to.
name? string Username.
displayName? string Human-readable name.
email? string Email address, when the instance exposes it.
role? AUTHOR|REVIEWER|PARTICIPANT REVIEWER or PARTICIPANT.
status? UNAPPROVED|NEEDS_WORK|APPROVED
approved boolean Whether this reviewer has approved.
mergeability? object Whether it can merge.
mergeable boolean Whether Bitbucket would accept a merge right now.
outcome? CLEAN|CONFLICTED|UNKNOWN
conflicted boolean Whether the merge would conflict.
blockers? list of object Merge checks currently refusing.
summary? string Short reason, as Bitbucket phrases it.
detail? string Longer explanation, when the instance gives one.
commentCount? integer Comments on the pull request.
openTaskCount? integer Unresolved tasks.
resolvedTaskCount? integer Resolved tasks.
bb pr review set¶
Set your review status on a pull request
bb pr review set <pr-id> <status>
A participant holds exactly one status. APPROVED and NEEDS_WORK are mutually exclusive, and UNAPPROVED is neither: requesting changes replaces an approval rather than joining it, and vice versa. Setting the status you already hold is a no-op.
approve and unapprove are shorthands for two of these three values. unapprove clears whichever status you hold, so it withdraws a request for changes as readily as an approval, which its name does not suggest.
# Request changes
bb pr review set 42 NEEDS_WORK --repo PROJ/repo
# Approve
bb pr review set 42 APPROVED --repo PROJ/repo
# Withdraw whichever status you hold
bb pr review set 42 UNAPPROVED --repo PROJ/repo
Inherited from bb pr:
--repo string- Repository as PROJECT/slug (defaults to the repository of the git checkout you are in, then BITBUCKET_PROJECT_KEY + BITBUCKET_REPO_SLUG)
Also takes the global flags.
Dry run: Checks your permission and the current state this depends on, without changing anything (preconditions-checked)
Output with --json, where ? marks a field that can be absent
data
repository object
projectKey string Project key the repository belongs to.
slug string Repository slug.
pullRequest object The pull request as it stands after the change.
id integer Pull request number, unique within the repository.
title string Pull request title.
description? string Body text, when one was written.
state OPEN|MERGED|DECLINED
open boolean Whether the pull request is still open.
closed boolean Whether the pull request is merged or declined.
draft? boolean Whether it is marked as a draft.
repository? object Repository the pull request merges into.
projectKey string Project key the repository belongs to.
slug string Repository slug.
sourceRepository? object Repository the source branch lives in.
projectKey string Project key the repository belongs to.
slug string Repository slug.
version integer Optimistic-locking version.
author? string Display name of whoever opened it.
authorUsername? string Username of whoever opened it.
sourceBranch? string Branch being merged from.
targetBranch? string Branch being merged into.
sourceCommit? string Head commit of the source branch when this was read.
createdDate? integer When it was opened, in milliseconds since the epoch.
updatedDate? integer When it last changed, in milliseconds since the epoch.
closedDate? integer When it was merged or declined, in milliseconds since the epoch.
url? string Where the pull request is in Bitbucket, as the server links to
it.
issueKeys? list of string Issue keys the title and source branch mention, such as
PROJ-123, in the order they appear.
reviewers? list of object Everyone asked to review, with where they got to.
name? string Username.
displayName? string Human-readable name.
email? string Email address, when the instance exposes it.
role? AUTHOR|REVIEWER|PARTICIPANT REVIEWER or PARTICIPANT.
status? UNAPPROVED|NEEDS_WORK|APPROVED
approved boolean Whether this reviewer has approved.
mergeability? object Whether it can merge.
mergeable boolean Whether Bitbucket would accept a merge right now.
outcome? CLEAN|CONFLICTED|UNKNOWN
conflicted boolean Whether the merge would conflict.
blockers? list of object Merge checks currently refusing.
summary? string Short reason, as Bitbucket phrases it.
detail? string Longer explanation, when the instance gives one.
commentCount? integer Comments on the pull request.
openTaskCount? integer Unresolved tasks.
resolvedTaskCount? integer Resolved tasks.
bb pr review unapprove¶
Clear your review status on a pull request
bb pr review unapprove <pr-id>
Shorthand for bb pr review set <pr-id> UNAPPROVED, and it does more than the name suggests: a participant holds one status, so this clears a request for changes as readily as an approval. There is no separate verb for withdrawing NEEDS_WORK.
# Withdraw your approval, or your request for changes
bb pr review unapprove 42 --repo PROJ/repo
Inherited from bb pr:
--repo string- Repository as PROJECT/slug (defaults to the repository of the git checkout you are in, then BITBUCKET_PROJECT_KEY + BITBUCKET_REPO_SLUG)
Also takes the global flags.
Dry run: Checks your permission and the current state this depends on, without changing anything (preconditions-checked)
Output with --json, where ? marks a field that can be absent
data
repository object
projectKey string Project key the repository belongs to.
slug string Repository slug.
pullRequest object The pull request as it stands after the change.
id integer Pull request number, unique within the repository.
title string Pull request title.
description? string Body text, when one was written.
state OPEN|MERGED|DECLINED
open boolean Whether the pull request is still open.
closed boolean Whether the pull request is merged or declined.
draft? boolean Whether it is marked as a draft.
repository? object Repository the pull request merges into.
projectKey string Project key the repository belongs to.
slug string Repository slug.
sourceRepository? object Repository the source branch lives in.
projectKey string Project key the repository belongs to.
slug string Repository slug.
version integer Optimistic-locking version.
author? string Display name of whoever opened it.
authorUsername? string Username of whoever opened it.
sourceBranch? string Branch being merged from.
targetBranch? string Branch being merged into.
sourceCommit? string Head commit of the source branch when this was read.
createdDate? integer When it was opened, in milliseconds since the epoch.
updatedDate? integer When it last changed, in milliseconds since the epoch.
closedDate? integer When it was merged or declined, in milliseconds since the epoch.
url? string Where the pull request is in Bitbucket, as the server links to
it.
issueKeys? list of string Issue keys the title and source branch mention, such as
PROJ-123, in the order they appear.
reviewers? list of object Everyone asked to review, with where they got to.
name? string Username.
displayName? string Human-readable name.
email? string Email address, when the instance exposes it.
role? AUTHOR|REVIEWER|PARTICIPANT REVIEWER or PARTICIPANT.
status? UNAPPROVED|NEEDS_WORK|APPROVED
approved boolean Whether this reviewer has approved.
mergeability? object Whether it can merge.
mergeable boolean Whether Bitbucket would accept a merge right now.
outcome? CLEAN|CONFLICTED|UNKNOWN
conflicted boolean Whether the merge would conflict.
blockers? list of object Merge checks currently refusing.
summary? string Short reason, as Bitbucket phrases it.
detail? string Longer explanation, when the instance gives one.
commentCount? integer Comments on the pull request.
openTaskCount? integer Unresolved tasks.
resolvedTaskCount? integer Resolved tasks.
bb pr status¶
Show pull requests waiting on you
bb pr status [flags]
Show pull requests waiting on you, in three sections: the pull requests for the current branch, the ones you opened, and the ones asking for your review.
The last two are cross-repository and need no repository context. The current-branch section needs a git checkout with a Bitbucket remote, and is reported as unavailable rather than as an error when there is not one.
# The pull requests of the current branch, the ones you opened and the ones waiting on your review
bb pr status
--all- Return every result rather than the first --limit
--limit int- Maximum number of results to return (default 25)
Inherited from bb pr:
--repo string- Repository as PROJECT/slug (defaults to the repository of the git checkout you are in, then BITBUCKET_PROJECT_KEY + BITBUCKET_REPO_SLUG)
Also takes the global flags.
Dry run: Runs as usual: this command changes nothing, so there is nothing to hold back
Output with --json, where ? marks a field that can be absent
data
currentBranch object Pull requests for the branch you are on.
pullRequests list of object or null Pull requests in this section.
id integer Pull request number, unique within the repository.
title string Pull request title.
description? string Body text, when one was written.
state string OPEN, MERGED or DECLINED.
open boolean Whether the pull request is still open.
closed boolean Whether the pull request is merged or declined.
draft? boolean Whether it is marked as a draft.
repository? object Repository the pull request merges into.
projectKey string Project key the repository belongs to.
slug string Repository slug.
sourceRepository? object Repository the source branch lives in.
projectKey string Project key the repository belongs to.
slug string Repository slug.
version integer Optimistic-locking version.
author? string Display name of whoever opened it.
authorUsername? string Username of whoever opened it.
sourceBranch? string Branch being merged from.
targetBranch? string Branch being merged into.
sourceCommit? string Head commit of the source branch when this was read.
createdDate? integer When it was opened, in milliseconds since the epoch.
updatedDate? integer When it last changed, in milliseconds since the epoch.
closedDate? integer When it was merged or declined, in milliseconds since the epoch.
url? string Where the pull request is in Bitbucket, as the server links to it.
issueKeys? list of string Issue keys the title and source branch mention, such as PROJ-123, in
the order they appear.
reviewers? list of object Everyone asked to review, with where they got to.
name? string Username.
displayName? string Human-readable name.
email? string Email address, when the instance exposes it.
role? string REVIEWER or PARTICIPANT.
status? string UNAPPROVED, NEEDS_WORK or APPROVED.
approved boolean Whether this reviewer has approved.
mergeability? object Whether it can merge.
mergeable boolean Whether Bitbucket would accept a merge right now.
outcome? string CLEAN, CONFLICTED or UNKNOWN.
conflicted boolean Whether the merge would conflict.
blockers? list of object Merge checks currently refusing.
summary? string Short reason, as Bitbucket phrases it.
detail? string Longer explanation, when the instance gives one.
commentCount? integer Comments on the pull request.
openTaskCount? integer Unresolved tasks.
resolvedTaskCount? integer Resolved tasks.
note? string Why the section is empty or unavailable, when it is not simply that
there are none.
branch? string Branch the working tree is on, when there is one.
repository? string Repository that branch belongs to, as PROJECT/slug.
createdByYou object Open pull requests you opened, across every repository.
pullRequests list of object or null Pull requests in this section.
id integer Pull request number, unique within the repository.
title string Pull request title.
description? string Body text, when one was written.
state string OPEN, MERGED or DECLINED.
open boolean Whether the pull request is still open.
closed boolean Whether the pull request is merged or declined.
draft? boolean Whether it is marked as a draft.
repository? object Repository the pull request merges into.
projectKey string Project key the repository belongs to.
slug string Repository slug.
sourceRepository? object Repository the source branch lives in.
projectKey string Project key the repository belongs to.
slug string Repository slug.
version integer Optimistic-locking version.
author? string Display name of whoever opened it.
authorUsername? string Username of whoever opened it.
sourceBranch? string Branch being merged from.
targetBranch? string Branch being merged into.
sourceCommit? string Head commit of the source branch when this was read.
createdDate? integer When it was opened, in milliseconds since the epoch.
updatedDate? integer When it last changed, in milliseconds since the epoch.
closedDate? integer When it was merged or declined, in milliseconds since the epoch.
url? string Where the pull request is in Bitbucket, as the server links to it.
issueKeys? list of string Issue keys the title and source branch mention, such as PROJ-123, in
the order they appear.
reviewers? list of object Everyone asked to review, with where they got to.
name? string Username.
displayName? string Human-readable name.
email? string Email address, when the instance exposes it.
role? string REVIEWER or PARTICIPANT.
status? string UNAPPROVED, NEEDS_WORK or APPROVED.
approved boolean Whether this reviewer has approved.
mergeability? object Whether it can merge.
mergeable boolean Whether Bitbucket would accept a merge right now.
outcome? string CLEAN, CONFLICTED or UNKNOWN.
conflicted boolean Whether the merge would conflict.
blockers? list of object Merge checks currently refusing.
summary? string Short reason, as Bitbucket phrases it.
detail? string Longer explanation, when the instance gives one.
commentCount? integer Comments on the pull request.
openTaskCount? integer Unresolved tasks.
resolvedTaskCount? integer Resolved tasks.
note? string Why the section is empty or unavailable, when it is not simply that
there are none.
requestingYourReview object Open pull requests waiting on your review, across every repository.
pullRequests list of object or null Pull requests in this section.
id integer Pull request number, unique within the repository.
title string Pull request title.
description? string Body text, when one was written.
state string OPEN, MERGED or DECLINED.
open boolean Whether the pull request is still open.
closed boolean Whether the pull request is merged or declined.
draft? boolean Whether it is marked as a draft.
repository? object Repository the pull request merges into.
projectKey string Project key the repository belongs to.
slug string Repository slug.
sourceRepository? object Repository the source branch lives in.
projectKey string Project key the repository belongs to.
slug string Repository slug.
version integer Optimistic-locking version.
author? string Display name of whoever opened it.
authorUsername? string Username of whoever opened it.
sourceBranch? string Branch being merged from.
targetBranch? string Branch being merged into.
sourceCommit? string Head commit of the source branch when this was read.
createdDate? integer When it was opened, in milliseconds since the epoch.
updatedDate? integer When it last changed, in milliseconds since the epoch.
closedDate? integer When it was merged or declined, in milliseconds since the epoch.
url? string Where the pull request is in Bitbucket, as the server links to it.
issueKeys? list of string Issue keys the title and source branch mention, such as PROJ-123, in
the order they appear.
reviewers? list of object Everyone asked to review, with where they got to.
name? string Username.
displayName? string Human-readable name.
email? string Email address, when the instance exposes it.
role? string REVIEWER or PARTICIPANT.
status? string UNAPPROVED, NEEDS_WORK or APPROVED.
approved boolean Whether this reviewer has approved.
mergeability? object Whether it can merge.
mergeable boolean Whether Bitbucket would accept a merge right now.
outcome? string CLEAN, CONFLICTED or UNKNOWN.
conflicted boolean Whether the merge would conflict.
blockers? list of object Merge checks currently refusing.
summary? string Short reason, as Bitbucket phrases it.
detail? string Longer explanation, when the instance gives one.
commentCount? integer Comments on the pull request.
openTaskCount? integer Unresolved tasks.
resolvedTaskCount? integer Resolved tasks.
note? string Why the section is empty or unavailable, when it is not simply that
there are none.
bb pr unwatch¶
Unwatch a pull request
bb pr unwatch <pr-id>
# Stop notifications for a pull request
bb pr unwatch 42 --repo PROJ/repo
Inherited from bb pr:
--repo string- Repository as PROJECT/slug (defaults to the repository of the git checkout you are in, then BITBUCKET_PROJECT_KEY + BITBUCKET_REPO_SLUG)
Also takes the global flags.
Dry run: Predicts the outcome from what it can read, without changing anything (predicted)
Output with --json, where ? marks a field that can be absent
data
repository object
projectKey string Project key the repository belongs to.
slug string Repository slug.
pullRequestId string Pull request that was watched or unwatched.
watched boolean Whether you are now watching it.
bb pr update¶
Update pull request metadata
Aliases: bb pr edit
bb pr update <pr-id> [flags]
Update a pull request's title, description, draft state or reviewers.
Bitbucket refuses an update carrying a version the pull request has moved on from, rather than overwriting someone else's change. bb reads that version, so --version is only needed to assert a particular one: pass it and a pull request that has changed since is reported instead of updated.
To mark a draft ready for review, or turn a pull request back into a draft, use bb pr ready.
# Update title and description
bb pr update 42 --repo PROJ/repo --title "New title" \
--description "What changed since the first review."
# Replace the reviewers with two people and a reviewer group
bb pr update 42 --repo PROJ/repo --reviewers alice,bob,@backend-team
# Mark a draft PR as ready for review
bb pr update 42 --repo PROJ/repo --draft=false
# Refuse the update if the pull request has changed since version 1
bb pr update 42 --repo PROJ/repo --version 1 --draft
--description string- Updated pull request description
--draft- Set draft state: --draft to mark as draft, --draft=false to mark as ready for review
--reviewers strings- Replace the reviewers (repeatable or comma-separated, accepts @group syntax); omit to keep the current reviewers, pass "" to clear them
--title string- Updated pull request title
--version int- Expected pull request version; omit to act on whatever version is current
Inherited from bb pr:
--repo string- Repository as PROJECT/slug (defaults to the repository of the git checkout you are in, then BITBUCKET_PROJECT_KEY + BITBUCKET_REPO_SLUG)
Also takes the global flags.
Dry run: Checks your permission and the current state this depends on, without changing anything (preconditions-checked)
Output with --json, where ? marks a field that can be absent
data
repository object
projectKey string Project key the repository belongs to.
slug string Repository slug.
pullRequest object The pull request as it stands after the change.
id integer Pull request number, unique within the repository.
title string Pull request title.
description? string Body text, when one was written.
state OPEN|MERGED|DECLINED
open boolean Whether the pull request is still open.
closed boolean Whether the pull request is merged or declined.
draft? boolean Whether it is marked as a draft.
repository? object Repository the pull request merges into.
projectKey string Project key the repository belongs to.
slug string Repository slug.
sourceRepository? object Repository the source branch lives in.
projectKey string Project key the repository belongs to.
slug string Repository slug.
version integer Optimistic-locking version.
author? string Display name of whoever opened it.
authorUsername? string Username of whoever opened it.
sourceBranch? string Branch being merged from.
targetBranch? string Branch being merged into.
sourceCommit? string Head commit of the source branch when this was read.
createdDate? integer When it was opened, in milliseconds since the epoch.
updatedDate? integer When it last changed, in milliseconds since the epoch.
closedDate? integer When it was merged or declined, in milliseconds since the epoch.
url? string Where the pull request is in Bitbucket, as the server links to
it.
issueKeys? list of string Issue keys the title and source branch mention, such as
PROJ-123, in the order they appear.
reviewers? list of object Everyone asked to review, with where they got to.
name? string Username.
displayName? string Human-readable name.
email? string Email address, when the instance exposes it.
role? AUTHOR|REVIEWER|PARTICIPANT REVIEWER or PARTICIPANT.
status? UNAPPROVED|NEEDS_WORK|APPROVED
approved boolean Whether this reviewer has approved.
mergeability? object Whether it can merge.
mergeable boolean Whether Bitbucket would accept a merge right now.
outcome? CLEAN|CONFLICTED|UNKNOWN
conflicted boolean Whether the merge would conflict.
blockers? list of object Merge checks currently refusing.
summary? string Short reason, as Bitbucket phrases it.
detail? string Longer explanation, when the instance gives one.
commentCount? integer Comments on the pull request.
openTaskCount? integer Unresolved tasks.
resolvedTaskCount? integer Resolved tasks.
bb pr watch¶
Watch a pull request
bb pr watch <pr-id>
# Get notified of changes to a pull request
bb pr watch 42 --repo PROJ/repo
Inherited from bb pr:
--repo string- Repository as PROJECT/slug (defaults to the repository of the git checkout you are in, then BITBUCKET_PROJECT_KEY + BITBUCKET_REPO_SLUG)
Also takes the global flags.
Dry run: Predicts the outcome from what it can read, without changing anything (predicted)
Output with --json, where ? marks a field that can be absent
data
repository object
projectKey string Project key the repository belongs to.
slug string Repository slug.
pullRequestId string Pull request that was watched or unwatched.
watched boolean Whether you are now watching it.