diff --git a/crates/pop-parachains/src/utils/git.rs b/crates/pop-parachains/src/utils/git.rs index 83b9c8f7..1cfd13d3 100644 --- a/crates/pop-parachains/src/utils/git.rs +++ b/crates/pop-parachains/src/utils/git.rs @@ -144,6 +144,7 @@ impl Git { pub struct GitHub; impl GitHub { + const GITHUB: &'static str = "github.com"; pub async fn get_latest_releases(repo: &Url) -> Result> { static APP_USER_AGENT: &str = concat!(env!("CARGO_PKG_NAME"), "/", env!("CARGO_PKG_VERSION")); @@ -219,7 +220,7 @@ impl GitHub { format!("{}/releases/download/{tag}/{artifact}", repo.as_str()) } pub(crate) fn convert_to_shh_url(url: &Url) -> String { - format!("git@{}:{}.git", url.host_str().unwrap_or("github.com"), &url.path()[1..]) + format!("git@{}:{}.git", url.host_str().unwrap_or(Self::GITHUB), &url.path()[1..]) } }