forked from kemitix/git-next
refactor: use 'server_repo_config' consistently
This commit is contained in:
parent
91870055b0
commit
1170510c44
2 changed files with 7 additions and 7 deletions
|
@ -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(),
|
||||
|
|
|
@ -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(),
|
||||
);
|
||||
|
|
Loading…
Reference in a new issue