Refactor Git hosting providers (#11457)
This PR refactors the code pertaining to Git hosting providers to make it more uniform and easy to add support for new providers. There is now a `GitHostingProvider` trait that contains the functionality specific to an individual Git hosting provider. Each provider we support has an implementation of this trait. Release Notes: - N/A
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
mod hosting_provider;
|
||||
mod hosting_providers;
|
||||
|
||||
use anyhow::{anyhow, Context, Result};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use std::ffi::OsStr;
|
||||
@@ -7,12 +10,12 @@ use std::str::FromStr;
|
||||
pub use git2 as libgit;
|
||||
pub use lazy_static::lazy_static;
|
||||
|
||||
pub use crate::hosting_provider::*;
|
||||
pub use crate::hosting_providers::*;
|
||||
|
||||
pub mod blame;
|
||||
pub mod commit;
|
||||
pub mod diff;
|
||||
pub mod hosting_provider;
|
||||
pub mod permalink;
|
||||
pub mod pull_request;
|
||||
pub mod repository;
|
||||
|
||||
lazy_static! {
|
||||
|
||||
Reference in New Issue
Block a user