Skip to content

feat(source-control): groundwork for self-hosted Bitbucket - #18240

Closed
OhadC wants to merge 1 commit into
pingdotgg:mainfrom
OhadC:bitbucket-dc/1-host-prep
Closed

OhadC wants to merge 1 commit into
pingdotgg:mainfrom
OhadC:bitbucket-dc/1-host-prep

Conversation

@OhadC

@OhadC OhadC commented Oct 11, 2026 •

Copy link
Copy Markdown

Self-hosted Bitbucket (Data Center / Server) support, proposed in #10837, needs four small things outside its own package. This PR lands only those, so the next two PRs stay inside the new package. It is the bottom of a three-PR stack: repositories in #18241, pull requests in #18242.

Summary

 SourceControlHost git
+  fetchRemoteRef({ remoteName, remoteRef, localBranch })   # Data Center checks out refs/pull-requests/N/from, which is not a branch

 SourceControlClientDefinition
-  publishDescription: string
+  publishDescription: string | null                         # null keeps a host out of the publish picker; every current host keeps its string

 source-control-bitbucket
+  export normalizeBitbucketChangeRequestId, toBitbucketChangeRequest   # moved to bitbucketPullRequests.ts so Data Center reuses them

 desktop backend env
+  NODE_USE_SYSTEM_CA=1                                      # the bundled server trusts the OS certificate store

Desktop users can't set environment for the bundled server, so a host behind an organization's own certificate authority fails TLS there. NODE_USE_SYSTEM_CA adds the OS store to Node's bundled roots; it removes nothing.

Evidence

No UI change: the publish picker lists the same hosts, since no host returns null yet.

  • GitVcsDriverCore.test.ts: fetchRemoteRef fetches a non-branch ref into a local branch.
  • DesktopBackendConfiguration.test.ts: the backend child env carries NODE_USE_SYSTEM_CA=1.
  • Typecheck and knip pass for the touched packages.

Merge Danger

Door: two-way

Blast Radius: desktop TLS

The bundled server now also trusts certificates from the OS store. That widens trust to whatever the machine trusts, which is what a browser on the same machine already does.

🤖 Generated with Claude Code — Claude Opus 5.5 in T3 Code

- Host port: `fetchRemoteRef` fetches any remote ref into a local branch, for hosts whose pull
  request refs are not branches.
- Bitbucket Cloud: the pull request id normalizer and the change request mapper are exported, so
  a second Bitbucket host can share them.
- Client definitions: a null `publishDescription` keeps a host out of the Publish picker.
- Desktop: the bundled server trusts the OS certificate store, for hosts behind a corporate CA.
@github-actions github-actions Bot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:L 100-499 changed lines (additions + deletions). labels Oct 11, 2026

Copy link
Copy Markdown
Member

Note

This comment is posted by Julius' dot

This prepares a new Data Center integration and changes the desktop's default TLS trust. #10837 still awaits maintainer sign-off on that direction and scope. The prior-approval requirement applies to drafts too, so I'm closing this. Please obtain approval in that discussion and link it when requesting reconsideration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L 100-499 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants