git_hosting_providers: Allow configuring additional hosting providers via settings (#26879)

Release Notes:

- Added a new `git_hosting_providers` setting for configuring custom Git
hosting providers.

---------

Co-authored-by: Marshall Bowers <git@maxdeviant.com>
This commit is contained in:
khayyam 2025-03-17 08:39:52 -07:00 committed by GitHub
parent 52567f4b72
commit 7d433a30ec
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 101 additions and 1 deletions

View file

@ -1,4 +1,5 @@
mod providers;
mod settings;
use std::sync::Arc;
@ -10,9 +11,12 @@ use url::Url;
use util::maybe;
pub use crate::providers::*;
pub use crate::settings::*;
/// Initializes the Git hosting providers.
pub fn init(cx: &App) {
pub fn init(cx: &mut App) {
crate::settings::init(cx);
let provider_registry = GitHostingProviderRegistry::global(cx);
provider_registry.register_hosting_provider(Arc::new(Bitbucket::public_instance()));
provider_registry.register_hosting_provider(Arc::new(Chromium));