Repository navigation
Conversation
- 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.
Self-hosted Bitbucket (Data Center or Server) is its own host, `bitbucket-server`, in `@t3tools/source-control-bitbucket-server`, next to Bitbucket Cloud. - Remotes on a host with a `bitbucket` label are Data Center; `bitbucket.org` stays Cloud. `/scm/` and any context path are dropped from the repository identity, so HTTPS and SSH remotes of one repository match. - Clone, look up, and create pull requests from the branch flow over the REST API. Publishing is refused, and the host is left out of the Publish picker. - Host URL and HTTP access token are saved from Source Control settings, with the token in the secret store. `T3CODE_BITBUCKET_SERVER_URL` and `T3CODE_BITBUCKET_SERVER_TOKEN` are the fallback. - Pull request URLs parse and build as `PROJECTKEY/repo-slug`, keeping the web port and context path. The client definition sits ahead of Cloud so Data Center URLs are attributed to it.
Member
|
Note This comment is posted by Julius' dot #14591's triage approves stopping misrouted Cloud requests and treats Data Center support as a separate feature. This PR adds that integration, while #10837 still awaits scope approval. I'm closing it under the prior-approval requirement. Please obtain maintainer approval in #10837 and link it when requesting reconsideration. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A self-hosted Bitbucket remote (Data Center or Server) is classified as Bitbucket Cloud, so T3 Code sends its requests, with any Cloud token, to
api.bitbucket.org(#14591). There is also no way to look up or clone a Data Center repository. This PR adds Data Center as its own host,@t3tools/source-control-bitbucket-server, for repositories. Proposed in #10837. It stacks on #18240; pull requests follow in #18242. Only the last commit is new here. GitHub can't base a PR on a fork branch, so this one targetsmainand also shows #18240's commit.Fixes #14591. It supersedes #14593, which marks these hosts unsupported until Data Center support exists.
Summary
https://host/scm/KEY/repo.git,ssh://git@host:7999/KEY/repo.git,~userpersonal repositories, and hosts served under a context path. Repository identity drops the context path and/scm/, so a clone URL and a browse URL name the same repository.T3CODE_BITBUCKET_SERVER_URLandT3CODE_BITBUCKET_SERVER_TOKENare the fallback. The token is only sent to the configured host. A remote on any other host fails with a clear error.publishDescription: null). The docs say to create the repository on the host and clone it.shared/sourceControl.ts, the PR URL shape inshared/changeRequestUrl.ts, registration inbuiltInDrivers.ts,sourceControlHostSecrets.ts, andclient-runtime, the settings search entry, a section indocs/user/source-control.md, plus knip, release smoke, and the lockfile.Evidence
Driven in a dev server against a real Data Center instance with a throwaway personal repository. The host name is blurred. Here the host is configured through the
T3CODE_BITBUCKET_SERVER_*fallback, which is why the Settings fields are empty while the row reads Authenticated.~userrepositoryTests:
BitbucketServerApi.test.ts(URL shapes, context paths, token only sent to the configured host, checkout),BitbucketServerSourceControlProvider.test.ts,RepositoryIdentityResolver.test.ts,changeRequestUrl.test.ts,sourceControl.test.ts,sourceControlClients.test.ts. Typecheck and knip pass.Merge Danger
Door: two-way
Blast Radius: self-hosted Bitbucket
Remotes on a
bitbuckethost other thanbitbucket.orgstop being treated as Cloud. Anyone relying onT3CODE_BITBUCKET_API_BASE_URLto reach such a host through the Cloud client loses that path. Per #14591's triage, that path could not work against Data Center anyway. One Data Center host per server.🤖 Generated with Claude Code — Claude Opus 5.5 in T3 Code