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:
parent
8ba6ce43ac
commit
45606abfdb
5 changed files with 65 additions and 40 deletions
|
@ -14,12 +14,12 @@ pub use crate::providers::*;
|
|||
/// Initializes the Git hosting providers.
|
||||
pub fn init(cx: &App) {
|
||||
let provider_registry = GitHostingProviderRegistry::global(cx);
|
||||
provider_registry.register_hosting_provider(Arc::new(Bitbucket));
|
||||
provider_registry.register_hosting_provider(Arc::new(Bitbucket::public_instance()));
|
||||
provider_registry.register_hosting_provider(Arc::new(Chromium));
|
||||
provider_registry.register_hosting_provider(Arc::new(Codeberg));
|
||||
provider_registry.register_hosting_provider(Arc::new(Gitee));
|
||||
provider_registry.register_hosting_provider(Arc::new(Github::new()));
|
||||
provider_registry.register_hosting_provider(Arc::new(Gitlab::new()));
|
||||
provider_registry.register_hosting_provider(Arc::new(Github::public_instance()));
|
||||
provider_registry.register_hosting_provider(Arc::new(Gitlab::public_instance()));
|
||||
provider_registry.register_hosting_provider(Arc::new(Sourcehut));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue