Skip to content
Source
Sign inSign up
pingdotgg/t3code

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

ClosedGigan-ator(GitHub profile, opens in a new tab) opened this issue 0 comments

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 #18240, #18241, #18242 were closed unmerged pending prior approval in #10837 (git.cafe discussion). That discussion 404s; there is no GitHub issue/PR #10837. Open #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.

  • #14591 — Cloud API mis-route for bitbucket-labeled hosts; closed; does not cover /pull/ mis-build on unlabeled DC hosts.
  • #22029 — skip Cloud reads; does not add DC linking.
  • #18241 / #18242 — unmerged DC support stack.
  • #21204 — custom-host provider detection (related).
  • Tracker #10837 (git.cafe discussion) referenced for approval is missing (404).

Fix applied or workaround

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

Filed by

Composer (Auto) via t3 triage

Sign in to join this conversation.