Repository navigation
Description
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.
- Hosts without a
bitbucketDNS label are not claimed bypackages/source-control-bitbucket, so remotes and PR URLs on those hosts are not parsed as Bitbucket. - Bitbucket Cloud URL parse expects
/workspace/repo/pull-requests/N. Data Center browse URLs are/projects/KEY/repos/slug/pull-requests/N. - When an agent links by repository + number without a real URL,
resolveTargetfalls back to the project host kind and builds a GitHub URL (.../owner/repo/pull/N). GitHub's parser accepts/owner/repo/pull/Non any host, so the link is stored. - Sync skips with
provider-unsupported: "Change requests cannot be browsed for this project's host yet." - 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
- Use a Data Center remote whose hostname does not contain
bitbucket(example shape:https://git.example.corp/scm/<project>/<repo>.git). - Open a thread in that project and have the agent
link_pull_requestwith repository + number (or a GitHub-shaped URL). - Observe the stored URL is
https://git.example.corp/<project>/<repo>/pull/<n>. - Real DC URL is
https://git.example.corp/projects/<KEY>/repos/<repo>/pull-requests/<n>. - 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
- Self-hosted Bitbucket (Server/Data Center) remotes are treated as Bitbucket Cloud → useless api.bitbucket.org traffic; request Bitbucket Server support #14591 — Cloud API mis-route for
bitbucket-labeled hosts; closed; does not cover/pull/mis-build on unlabeled DC hosts. - fix(bitbucket): skip Cloud API reads for unsupported Server remotes #22029 — skip Cloud reads; does not add DC linking.
- feat(source-control): Bitbucket Data Center repositories #18241 / feat(pull-requests): Bitbucket Data Center pull requests #18242 — unmerged DC support stack.
- fix(source-control): configure provider detection for custom hosts #21204 — custom-host provider detection (related).
- Tracker [Feature] Support BitBucket data center #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
Activity