refactor: use 'server_repo_config' consistently

This commit is contained in:
Paul Campbell 2024-04-20 20:50:50 +01:00
parent 91870055b0
commit 1170510c44
2 changed files with 7 additions and 7 deletions

View file

@ -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(),

View file

@ -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(),
);