From 1170510c440f1d8384f1d6741115d650cfa56850 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Sat, 20 Apr 2024 20:50:50 +0100 Subject: [PATCH] refactor: use 'server_repo_config' consistently --- src/server/config/mod.rs | 8 ++++---- src/server/mod.rs | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/server/config/mod.rs b/src/server/config/mod.rs index 210ab5d1..4a95622b 100644 --- a/src/server/config/mod.rs +++ b/src/server/config/mod.rs @@ -328,15 +328,15 @@ pub struct RepoDetails { impl RepoDetails { pub fn new( name: &RepoAlias, - repo: &ServerRepoConfig, + server_repo_config: &ServerRepoConfig, forge_name: &ForgeName, forge: &ForgeConfig, ) -> Self { Self { name: name.clone(), - repo: RepoPath(repo.repo.clone()), - config: repo.repo_config(), - branch: BranchName(repo.branch.clone()), + repo: RepoPath(server_repo_config.repo.clone()), + config: server_repo_config.repo_config(), + branch: BranchName(server_repo_config.branch.clone()), forge: ForgeDetails { name: forge_name.clone(), forge_type: forge.forge_type.clone(), diff --git a/src/server/mod.rs b/src/server/mod.rs index 875bf6f7..44833722 100644 --- a/src/server/mod.rs +++ b/src/server/mod.rs @@ -91,12 +91,12 @@ fn create_actor( ) -> impl Fn((RepoAlias, &ServerRepoConfig)) -> (ForgeName, RepoAlias, RepoActor) { let webhook = webhook.clone(); let net = net.clone(); - move |(repo_name, repo)| { - let span = tracing::info_span!("Repo", %repo_name, %repo); + move |(repo_name, server_repo_config)| { + let span = tracing::info_span!("Repo", %repo_name, %server_repo_config); let _guard = span.enter(); info!("Creating Repo"); let actor = actors::repo::RepoActor::new( - config::RepoDetails::new(&repo_name, repo, &forge_name, &forge), + config::RepoDetails::new(&repo_name, server_repo_config, &forge_name, &forge), webhook.clone(), net.clone(), );