Skip to content

Bitbucket Data Center PR links saved as GitHub /pull/ URLs and never sync #26493

Closed

Description

@Gigan-ator

What happened

We use Bitbucket Data Center. Thread PR linking fails often. Linked URLs look like GitHub (.../pull/N) instead of Data Center (.../pull-requests/N). Sync then cannot browse the host. Seen on stable and nightly.

Diagnosis

Remote shape: https://git.example.corp/scm/<project>/<repo>.git (Data Center). Hostname has no bitbucket DNS label.

  1. Hosts without a bitbucket DNS label are not claimed by packages/source-control-bitbucket, so remotes and PR URLs on those hosts are not parsed as Bitbucket.
  2. Bitbucket Cloud URL parse expects /workspace/repo/pull-requests/N. Data Center browse URLs are /projects/KEY/repos/slug/pull-requests/N.
  3. When an agent links by repository + number without a real URL, resolveTarget falls back to the project host kind and builds a GitHub URL (.../owner/repo/pull/N). GitHub's parser accepts /owner/repo/pull/N on any host, so the link is stored.
  4. Sync skips with provider-unsupported: "Change requests cannot be browsed for this project's host yet."
  5. Full DC support PRs feat(source-control): groundwork for self-hosted Bitbucket #18240, feat(source-control): Bitbucket Data Center repositories #18241, feat(pull-requests): Bitbucket Data Center pull requests #18242 were closed unmerged pending prior approval in [Feature] Support BitBucket data center #10837 (git.cafe discussion). That discussion 404s; there is no GitHub issue/PR [Feature] Support BitBucket data center #10837. Open fix(bitbucket): skip Cloud API reads for unsupported Server remotes #22029 only skips Cloud API reads for unsupported Server remotes.

Steps to reproduce

  1. Use a Data Center remote whose hostname does not contain bitbucket (example shape: https://git.example.corp/scm/<project>/<repo>.git).
  2. Open a thread in that project and have the agent link_pull_request with repository + number (or a GitHub-shaped URL).
  3. Observe the stored URL is https://git.example.corp/<project>/<repo>/pull/<n>.
  4. Real DC URL is https://git.example.corp/projects/<KEY>/repos/<repo>/pull-requests/<n>.
  5. PR sync / watch does not browse the host (provider-unsupported).

Version

Stable 0.1.3 and nightly 0.1.3-nightly.20261026.3740 (same failure on both).
Triage CLI that ran this session: 0.1.3.

Environment

Windows 10.0.26100 (win32 x64), Node v26.12.1, local server via npx install (serverInstallation.kind: npx), Cursor harness against a local server on port 3773.

Evidence

Stored link shape (agent source):
https://git.example.corp/<project>/<repo>/pull/1

Real Data Center PR URL shape:
https://git.example.corp/projects/<KEY>/repos/<repo>/pull-requests/<n>

Trace (redacted): PullRequestSyncReactor sweep skipped a large batch of links for that custom DC host with reason Change requests cannot be browsed for this project's host yet.

Related issues

Fix applied or workaround

None. No local config makes Data Center PR link + browse work today.

Filed by

Composer (Auto) via t3 triage

Activity

  1. locked and limited conversation to collaborators on Oct 28, 2026
  2. converted this issue into a discussion #26498 on Oct 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions