git_hosting_providers: Refactor constructors (#26919)

This PR refactors the constructors for the various Git hosting providers
to facilitate adding support for more self-hosted variants.

Release Notes:

- N/A
This commit is contained in:
Marshall Bowers 2025-03-17 09:46:58 -04:00 committed by GitHub
parent 8ba6ce43ac
commit 45606abfdb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 65 additions and 40 deletions

View file

@ -271,7 +271,7 @@ impl TestServer {
let git_hosting_provider_registry = cx.update(GitHostingProviderRegistry::default_global);
git_hosting_provider_registry
.register_hosting_provider(Arc::new(git_hosting_providers::Github::new()));
.register_hosting_provider(Arc::new(git_hosting_providers::Github::public_instance()));
let user_store = cx.new(|cx| UserStore::new(client.clone(), cx));
let workspace_store = cx.new(|cx| WorkspaceStore::new(client.clone(), cx));