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 {
|
impl RepoDetails {
|
||||||
pub fn new(
|
pub fn new(
|
||||||
name: &RepoAlias,
|
name: &RepoAlias,
|
||||||
repo: &ServerRepoConfig,
|
server_repo_config: &ServerRepoConfig,
|
||||||
forge_name: &ForgeName,
|
forge_name: &ForgeName,
|
||||||
forge: &ForgeConfig,
|
forge: &ForgeConfig,
|
||||||
) -> Self {
|
) -> Self {
|
||||||
Self {
|
Self {
|
||||||
name: name.clone(),
|
name: name.clone(),
|
||||||
repo: RepoPath(repo.repo.clone()),
|
repo: RepoPath(server_repo_config.repo.clone()),
|
||||||
config: repo.repo_config(),
|
config: server_repo_config.repo_config(),
|
||||||
branch: BranchName(repo.branch.clone()),
|
branch: BranchName(server_repo_config.branch.clone()),
|
||||||
forge: ForgeDetails {
|
forge: ForgeDetails {
|
||||||
name: forge_name.clone(),
|
name: forge_name.clone(),
|
||||||
forge_type: forge.forge_type.clone(),
|
forge_type: forge.forge_type.clone(),
|
||||||
|
|
|
@ -91,12 +91,12 @@ fn create_actor(
|
||||||
) -> impl Fn((RepoAlias, &ServerRepoConfig)) -> (ForgeName, RepoAlias, RepoActor) {
|
) -> impl Fn((RepoAlias, &ServerRepoConfig)) -> (ForgeName, RepoAlias, RepoActor) {
|
||||||
let webhook = webhook.clone();
|
let webhook = webhook.clone();
|
||||||
let net = net.clone();
|
let net = net.clone();
|
||||||
move |(repo_name, repo)| {
|
move |(repo_name, server_repo_config)| {
|
||||||
let span = tracing::info_span!("Repo", %repo_name, %repo);
|
let span = tracing::info_span!("Repo", %repo_name, %server_repo_config);
|
||||||
let _guard = span.enter();
|
let _guard = span.enter();
|
||||||
info!("Creating Repo");
|
info!("Creating Repo");
|
||||||
let actor = actors::repo::RepoActor::new(
|
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(),
|
webhook.clone(),
|
||||||
net.clone(),
|
net.clone(),
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in a new issue