1mod providers;
2
3use std::sync::Arc;
4
5use git::GitHostingProviderRegistry;
6use gpui::AppContext;
7
8pub use crate::providers::*;
9
10/// Initializes the Git hosting providers.
11pub fn init(cx: &AppContext) {
12 let provider_registry = GitHostingProviderRegistry::global(cx);
13
14 // The providers are stored in a `BTreeMap`, so insertion order matters.
15 // GitHub comes first.
16 provider_registry.register_hosting_provider(Arc::new(Github));
17
18 // Then GitLab.
19 provider_registry.register_hosting_provider(Arc::new(Gitlab));
20
21 // Then the other providers, in the order they were added.
22 provider_registry.register_hosting_provider(Arc::new(Gitee));
23 provider_registry.register_hosting_provider(Arc::new(Bitbucket));
24 provider_registry.register_hosting_provider(Arc::new(Sourcehut));
25 provider_registry.register_hosting_provider(Arc::new(Codeberg));
26}