Skip to content

v6.0.0

Choose a tag to compare

@github-actions github-actions released this 22 Oct 05:49
· 16 commits to main since this release

v6.0.0

bb v6.0.0 makes its MCP server one you can hand to an agent without watching every call. It only reads unless you let it write, leaves approving a pull request to you, ends what it publishes with a line saying an AI agent wrote it, and asks you first only when you want it to. A repository you clone can no longer steer bb, and the commands that read a pull request find it from the branch you are on.

It is a major release. Seven changes can break a script, a pipeline or an MCP configuration. They are under "Before you upgrade", each with what to change, and are the part to read first if bb runs in CI, in scripts or under an AI agent. What v5.0.0 deprecated is gone. What this release deprecates keeps working until v7.0.0 and is listed at the end.

New at the command line

  • The commands that read a pull request take it from the branch you are on (ADR-102, #766):

    In a checkout, bb pr view, bb pr checks, bb pr diff and the other commands that only read one pull request need no number. They read the open pull request from the checked-out branch, as gh pr view does, and name it on stderr. A branch with none, or with several, is refused, naming what was found. In a fork's checkout it is the pull request from the fork into its upstream.

    git switch feature/refunds
    bb pr checks
  • bb pr comment delete deletes a comment or a task (#785):

    Bitbucket keeps a task as a comment, so one command removes either. --dry-run says what Bitbucket will do first: a comment with replies, somebody else's comment you do not administer, and a comment that changed since the --version you name are each refused.

    bb pr comment delete 42 1389396
  • Guides for the jobs people ask about (#774, #775): a How do I section, with running bb in a CI pipeline, setting up the MCP server in each client, and changing many repositories at once.

New in the MCP server

  • What an agent writes says an AI agent wrote it (ADR-105, #797):

    A pull request description, a comment or a tag message written through the MCP server goes out under your name. bb ends each with a line saying an agent wrote it for you, so the people who read it know who they are answering:

    Retries a declined refund once before failing it.
    
    _Written by an AI agent for @alice, via bb._
    

    Where an organisation cannot allow the line, --ai-disclosure=false or mcp_ai_disclosure: false turns it off. The server then publishes nothing the agent wrote under your name at once: it does not offer create_pull_request or update_pull_request, it refuses a tag message, and comments still wait in your review until you publish it.

For administrators

The MCP server's settings, in your own configuration file, and the policy keys that decide them for everyone on a machine:

Key Registry value Effect
mcp_allow_writes true in your own file lets the server change Bitbucket, as --allow-writes does. The read_only policy keeps it read-only whatever this says.
mcp_elicitation_opt_in MCPElicitationOptIn true makes the server ask before each call of a tool that decides a merge, as --elicitation-opt-in does. As policy it requires asking, and false does not switch asking off.
mcp_ai_disclosure MCPAIDisclosure false turns off the line saying an AI agent wrote a text, as --ai-disclosure=false does. As policy it decides for everyone, either way.

Set a key in your own config.yaml, or as policy at the top level of the system file or under HKLM\Software\Policies\bb on Windows (System Policy).

Before you upgrade

  1. The MCP server only reads unless you let it write (ADR-103, #799):
    • bb ai mcp serve offers the tools that read, and nothing that changes Bitbucket. A client configuration whose agent creates or updates pull requests, comments, merges, reports build statuses or creates tags adds --allow-writes to the server's args, or sets mcp_allow_writes: true in your configuration file.
    • bb ai mcp tools lists what a server with the same flags offers: the tools that read, and with --allow-writes every tool.
  2. The MCP server asks you only when you opt in (ADR-103, #795):
    • Merging, turning auto-merge on or off, reporting a build status, creating a tag and changing a pull request's draft flag no longer ask you in the client first, and a client that cannot ask is no longer refused them with -32021. Your MCP client decides whether a call runs, through its own prompts and rules, as it does for its other tools.
    • To keep the confirmations, start the server with --elicitation-opt-in, set mcp_elicitation_opt_in: true in your configuration file, or set the policy key for everyone.
  3. An agent prepares a review for you to publish, rather than approving (ADR-104, #796):
    • submit_pr_review is gone, and nothing through MCP approves, requests changes or publishes a review. prepare_pr_review tells the agent where your review waits and the status it suggests, and you publish it in Bitbucket with Finish review.
    • add_pr_comment adds a pending comment to your review rather than publishing it. Nobody else sees it until you publish the review.
    • A prompt or instruction that has the agent call submit_pr_review has it call prepare_pr_review and tell you where the review is.
  4. MCP tools take a pull request's id as a number (#809):
    • pr_id on every pull request tool, and id on show, is an integer, as every answer carries it. A string is refused with a schema error:

      {"name": "get_pull_request", "arguments": {"project": "PAY", "repo": "ledger", "pr_id": 42}}
    • get_pull_request still takes its former id argument as a string. It is deprecated.

  5. A repository's files no longer steer bb (ADR-058, #770):
    • A repository's .env sets only bb's credentials, repository context, timeouts, retries, webhook secrets, logging and prompts, each in capitals; Environment Variables lists them. Anything else in it is not applied, among it BITBUCKET_URL, BB_CONFIG_PATH, HTTPS_PROXY, BB_CA_FILE, BB_INSECURE_SKIP_VERIFY and BB_DISABLE_STORED_CONFIG. A cloned repository could otherwise send your token to a host, or through a proxy, of its choosing.
    • A workspace .bb/config.yaml no longer sets default_host or update_base_url. It still sets project_key.
    • bb warns once about each setting of its own it did not take, naming the file, and bb doctor shows it. Set the host in your environment, with --host, or with bb auth server use, and anything else in your environment or your own configuration file.
  6. A group's flag works only on the commands that read it (#722):
    • Commands that ignored a flag of their group now refuse it: --filter on bb tag create, view and delete; --start on every bb branch command but list, and on bb commit get, compare and prs; --config-file on bb reviewer condition list and delete. Remove the flag: it never had an effect there.
  7. What v5.0.0 deprecated is gone (ADR-084):
    • bb ai mcp serve --yolo, bb ai mcp tools --safe-only, and the safe and exposure fields of bb ai mcp tools --json. Read writes and asks:

      {
        "data": [
          {
            "name": "merge_pull_request",
            "description": "Merge a pull request. ...",
            "writes": true,
            "asks": "always"
          }
        ],
        "meta": { "command": "ai mcp tools", "bbVersion": "..." }
      }
    • --matcher-display on bb branch restriction create and update and on bb project branch-restriction create and update. Bitbucket names the matcher from --matcher-id, as it always did.

    • --include-unique on bb build status stats, get and set.

    • --limit and --all on bb build required delete.

    • scheduled, staged, paths.staged and paths.swapResult in bb update --json, which were always false or empty. Read applied for whether the new binary is in place; paths holds install alone. With release and trust left out:

      {
        "data": {
          "currentVersion": "v5.0.1",
          "latestVersion": "v6.0.0",
          "updateAvailable": true,
          "upToDate": false,
          "comparison": "upgrade_available",
          "currentVersionComparable": true,
          "latestVersionComparable": true,
          "dryRun": false,
          "applied": true,
          "plannedAction": "replace",
          "paths": { "install": "/usr/local/bin/bb" },
          "platform": "linux/amd64"
        },
        "meta": { "command": "update", "bbVersion": "..." }
      }

Other fixes worth knowing

  • A user whose login name holds an @ or a +, as names under LDAP and SSO often do, is known to bb: bb auth identity names them and their slug, bb pr review set finds them among the reviewers, and a view knows whose card it shows (#807).
  • The git credential helper hands git an access token in a form Bitbucket takes (#801), and names bb by a path that survives an upgrade (#777).
  • bb pr create from a branch Bitbucket does not have says to push it first (#767).
  • create_pull_request without a target opens the pull request into the repository's default branch, and merge_pull_request says what Bitbucket needs before it merges (#772).
  • --dry-run on bb pr comment delete and bb repo comment delete predicts the refusal of a stale --version, and, on a token, of somebody else's comment.

Deprecation

These keep working, warn on stderr, and are removed in v7.0.0:

  • --read-only on bb ai mcp serve and bb ai mcp tools. The server only reads unless --allow-writes is passed, so remove it.
  • The id argument of the MCP tool get_pull_request. Send pr_id.

Changes since v5.0.1.

Compare: v5.0.1...v6.0.0

⚠ Breaking Changes

  • remove --limit and --all from bb build required delete, deprecated in v5.0.0 (0c5bc25) — bb build required delete no longer takes --limit or --all; remove them.
  • remove --include-unique, deprecated in v5.0.0 (8ca4f92) — bb build status stats, get and set no longer take --include-unique; remove it. bb build status get lists each build with its state.
  • remove --matcher-display, deprecated in v5.0.0 (bbcbf2b) — bb branch restriction create and update and bb project branch-restriction create and update no longer take --matcher-display; remove it. Bitbucket names the matcher from --matcher-id as before.
  • remove --yolo, --safe-only, and the safe and exposure fields deprecated in v5.0.0 (4a09bbc) — bb ai mcp serve no longer takes --yolo, and bb ai mcp tools no longer takes --safe-only: remove them from a client configuration or script, which now fails with an unknown flag. bb ai mcp tools --json has no safe or exposure field: read writes for whether a tool changes anything, and asks for whether it asks first.
  • remove the swap fields deprecated in v5.0.0 from bb update --json (26da64d) — bb update --json has no scheduled, staged, paths.staged or paths.swapResult. They were always false or empty; read applied for whether the new binary is in place.
  • let a repository's .env set only bb's own credentials, context and preferences (402e894) — a repository's .env sets only BITBUCKET_TOKEN, BITBUCKET_USERNAME, BITBUCKET_USER, BITBUCKET_PASSWORD, ADMIN_USER, ADMIN_PASSWORD, BITBUCKET_PROJECT_KEY, BITBUCKET_REPO_SLUG, BITBUCKET_VERSION_TARGET, BB_REQUEST_TIMEOUT, BB_RETRY_COUNT, BB_RETRY_BACKOFF, BB_WEBHOOK_SECRET, BB_WEBHOOK_PASSWORD, BB_LOG_LEVEL, BB_LOG_FORMAT, NO_COLOR, BB_NO_PROMPT, BB_NO_PROMPT_VARS, BB_REQUIRE_KEYRING and BB_DISABLE_UPDATE, in capitals. Anything else in it, such as HTTPS_PROXY, BB_CA_FILE, BB_INSECURE_SKIP_VERIFY, BB_CLIENT_CERT or BB_DISABLE_STORED_CONFIG, is not applied: set it in your environment. update_base_url in a workspace file is not read: set it in your own configuration file.
  • take every pull request ID as the integer the answers carry (dfd2a79) — the MCP tools take pr_id, and show and refresh_view take id, as an integer: send "pr_id": 42, not "pr_id": "42". A string is refused with a schema error. get_pull_request's former id argument is still a string.
  • take a group's flag only on the commands that read it (2ba0ced) — commands that ignored a flag of their group now refuse it: --filter on bb tag create, view and delete; --start on every bb branch command but list and on bb commit get, compare and prs; --config-file on bb reviewer condition list and delete. Remove the flag; it never had an effect there.
  • let no repository file choose the Bitbucket host (d489338) — a repository's .env and .bb/config.yaml no longer choose the Bitbucket host. Set BITBUCKET_URL in your environment, pass --host, or run bb auth server use; a workspace file still sets project_key.
  • prepare a review for the person to publish instead of approving (ee7ead0) — the MCP tool submit_pr_review is gone, and nothing through MCP approves, requests changes or publishes a review. Call prepare_pr_review instead and tell the person where their review waits; they publish it in Bitbucket. add_pr_comment now adds a pending comment to the person's review rather than publishing it.
  • serve only the tools that read unless --allow-writes is passed (b85e4d7) — bb ai mcp serve exposes only the tools that read by default. A client configuration that creates or updates pull requests, comments, merges, reviews, reports build statuses or creates tags through MCP has to add --allow-writes to the server's args, or set mcp_allow_writes: true in the configuration file. bb ai mcp tools without flags lists only the tools that read; pass --allow-writes for every tool.
  • ask the person only on a server started with --elicitation-opt-in (c17b60d) — bb ai mcp serve no longer asks before merge_pull_request, enable_auto_merge, disable_auto_merge, submit_pr_review, set_build_status, create_tag, or update_pull_request setting draft, and no longer refuses them with -32021 to a client that cannot ask. To keep the confirmations, start the server with --elicitation-opt-in, set mcp_elicitation_opt_in: true in your configuration file, or set the mcp_elicitation_opt_in policy key for every user on a machine.
All 58 changes

Features

  • build: remove --limit and --all from bb build required delete, deprecated in v5.0.0 (0c5bc25)
  • build: remove --include-unique, deprecated in v5.0.0 (8ca4f92)
  • branch: remove --matcher-display, deprecated in v5.0.0 (bbcbf2b)
  • mcp: remove --yolo, --safe-only, and the safe and exposure fields deprecated in v5.0.0 (4a09bbc)
  • update: remove the swap fields deprecated in v5.0.0 from bb update --json (26da64d)
  • cli: take a group's flag only on the commands that read it (2ba0ced)
  • mcp: end what an agent writes through MCP with a line saying so (2db9ab6)
  • mcp: prepare a review for the person to publish instead of approving (ee7ead0)
  • mcp: serve only the tools that read unless --allow-writes is passed (b85e4d7)
  • mcp: ask the person only on a server started with --elicitation-opt-in (c17b60d)
  • pr: delete a pull request comment or task with bb pr comment delete (ff227f2)
  • pr: read the checked-out branch's pull request when no number is given (9c46464)

Fixes

  • mcp: list get_pull_request's former id among the deprecations (c9e944a)
  • mcp: say when Bitbucket publishes a comment add_pr_comment meant to leave pending (7cc2c3d)
  • mcp: refuse a tag message before asking the person about the tag (9a5fe82)
  • pr: predict a comment delete with its version and the caller Bitbucket names (c5dd35e)
  • pr: take the checked-out branch's pull request from this repository (5b28548)
  • config: let a repository's .env set only bb's own credentials, context and preferences (402e894)
  • mcp: take every pull request ID as the integer the answers carry (dfd2a79)
  • auth: tell the caller's login name from their slug (18b0f67)
  • config: let no repository file choose the Bitbucket host (d489338)
  • mcp: open a pull request into the default branch when create_pull_request names no target (532ce3c)
  • auth: name bb in the git helper line by the path an upgrade keeps (6b569f7)
  • pr: say to push a branch Bitbucket does not have before creating from it (245f553)
  • mcp: hold every tool's four hints as clients receive them (dfb2944)
  • mcp: let get_pull_request take pr_id like every pull request tool (5ced2c6)
  • mcp: say what merge_pull_request needs as Bitbucket decides it (f5f7c9e)
  • auth: send git an access token the way Bitbucket takes it (9d96f93)
  • deps: build with Go 1.27.3 (98635f2)
  • deps: build with Go 1.27.2 and golang.org/x/net v0.60.0 (a5533cb)

Docs

  • release: write the v6.0.0 notes for the upgrader (0a12759)
  • correct what the review of next found (34228c1)
  • add a how-do-I section, a CI pipeline page and MCP setup per client (e9452cf)
  • add a guide to changing many repositories (65d2a3a)
  • skill: leave the verdict on a review to the person, and say an AI agent wrote it (abfceed)
  • security: describe the MCP guards that hold whatever the client does (928159d)
  • mcp: list copying a file into a write in the threat model, and set up a scoped server first (de921bb)
  • versions: say CI tests the newest release and when the others last passed (e48349d)
  • auth: say how the git credential helper sends a token (fb692d6)

Tests

  • live: record that every release in the window passed on 0c5bc25 (888bd53)
  • cli: hold the flag refusal test to a command that exists (1f01924)
  • live: take each release's answer for a repository token's username (e5a75ca)
  • live: end the window of releases tested with 10.5.1 (22b5fad)

Build

  • lint: lint with golangci-lint v2.14.0, which reads Go 1.27.2 (9621551)

Chores

  • deps: Bump github.com/chromedp/cdproto (b2f9c42)
  • deps: Bump the gomod-minor-patch group with 2 updates (05684c3)
  • deps: Bump the gomod-minor-patch group across 1 directory with 7 updates (f412bd1)
  • deps: Bump actions/upload-artifact from 7.0.1 to 7.0.2 (81de97f)
  • deps: Bump actions/download-artifact from 8.0.1 to 8.0.2 (83a9b93)
  • deps: Bump the gomod-minor-patch group across 1 directory with 14 updates (ecd59e0)
  • deps: Bump astral-sh/setup-uv from 10.2.0 to 10.3.0 (8790765)
  • deps: Bump atlassian/bitbucket in /docker/harness (a0f0e5f)
  • deps: Bump vedantmgoyal9/winget-releaser (598f085)
  • deps: Bump github.com/dlclark/regexp2/v2 (79bca2d)
  • deps: Bump the gomod-minor-patch group with 4 updates (32f0dc3)
  • deps: bump the gomod group and move the view tests to chromedp v0.20 (184c948)
  • deps: Bump github.com/dlclark/regexp2/v2 (451a34f)
  • deps: Bump anchore/sbom-action from 0.24.2 to 0.24.3 (4fdf268)