diff --git a/src/server/actors/repo/webhook.rs b/src/server/actors/repo/webhook.rs index 46b9cdf4..0dae1ea6 100644 --- a/src/server/actors/repo/webhook.rs +++ b/src/server/actors/repo/webhook.rs @@ -111,7 +111,7 @@ pub async fn register( let url = network::NetUrl::new(format!( "https://{hostname}/api/v1/repos/{repo_path}/hooks?token={token}" )); - let repo_alias = &repo_details.name; + let repo_alias = &repo_details.repo_alias; let headers = network::NetRequestHeaders::new().with("Content-Type", "application/json"); let authorisation = WebhookAuth::generate(); let body = json!({ diff --git a/src/server/config/mod.rs b/src/server/config/mod.rs index 94151eeb..74d85f5d 100644 --- a/src/server/config/mod.rs +++ b/src/server/config/mod.rs @@ -322,7 +322,7 @@ impl Deref for BranchName { /// The derived information about a repo, used to interact with it #[derive(Clone, Debug)] pub struct RepoDetails { - pub name: RepoAlias, + pub repo_alias: RepoAlias, pub repo_path: RepoPath, pub branch: BranchName, pub forge: ForgeDetails, @@ -337,7 +337,7 @@ impl RepoDetails { forge: &ForgeConfig, ) -> Self { Self { - name: name.clone(), + repo_alias: name.clone(), repo_path: RepoPath(server_repo_config.repo.clone()), repo_config: server_repo_config.repo_config(), branch: BranchName(server_repo_config.branch.clone()), @@ -369,7 +369,7 @@ impl Display for RepoDetails { f, "{}/{} ({}): {}:{}/{} @ {}", self.forge.name, - self.name, + self.repo_alias, self.forge.forge_type, self.forge.hostname, self.forge.user, diff --git a/src/server/gitforge/forgejo/repo/clone.rs b/src/server/gitforge/forgejo/repo/clone.rs index 2b3df744..f840f7d1 100644 --- a/src/server/gitforge/forgejo/repo/clone.rs +++ b/src/server/gitforge/forgejo/repo/clone.rs @@ -15,7 +15,7 @@ pub fn clone(repo_details: &RepoDetails, gitdir: GitDir) -> Result<(), RepoClone gitdir ) .into(); - let repo_name = &repo_details.name; + let repo_name = &repo_details.repo_alias; info!("Cloning {repo_name} to {gitdir}"); match gix::command::prepare(command.expose_secret()) .with_shell_allow_argument_splitting() diff --git a/src/server/gitforge/tests/common.rs b/src/server/gitforge/tests/common.rs index 5e2fe5a8..4d422db5 100644 --- a/src/server/gitforge/tests/common.rs +++ b/src/server/gitforge/tests/common.rs @@ -35,7 +35,7 @@ pub fn repo_details( gitdir: Option, ) -> RepoDetails { RepoDetails { - name: repo_alias(n), + repo_alias: repo_alias(n), repo_path: repo_path(n), gitdir, branch: branch_name(n),