git_hosting_providers: Add support for Chromium repositories (#24881)

Add an implementation of GitHostingProvider for repositories hosted on
https://chromium.googlesource.com. Pull requests target the Gerrit
instance at https://chromium-review.googlesource.com and avatar images
are fetched using the Gerrit REST API.

<img width="513" alt="Screenshot 2025-02-20 at 6 43 37 PM"
src="https://github.com/user-attachments/assets/867af988-594d-45ea-8482-e40517443c73"
/>

<img width="511" alt="Screenshot 2025-02-20 at 6 43 51 PM"
src="https://github.com/user-attachments/assets/1d412904-048d-4a2d-8494-0837e75f8d61"
/>

Release Notes:

- Added support for repositories hosted on `chromium.googlesource.com`
for Git blames and permalinks.

---------

Co-authored-by: Marshall Bowers <git@maxdeviant.com>
This commit is contained in:
Henrique Ferreiro 2025-02-21 01:11:32 +01:00 committed by GitHub
parent 5dd351551d
commit ec00fb97fd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 305 additions and 0 deletions

View file

@ -12,6 +12,7 @@ pub use crate::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(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));