refactor: rename name to repo_alias for consistency
This commit is contained in:
parent
32d54cfc1c
commit
8b56a185d3
4 changed files with 6 additions and 6 deletions
|
@ -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!({
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -35,7 +35,7 @@ pub fn repo_details(
|
|||
gitdir: Option<GitDir>,
|
||||
) -> RepoDetails {
|
||||
RepoDetails {
|
||||
name: repo_alias(n),
|
||||
repo_alias: repo_alias(n),
|
||||
repo_path: repo_path(n),
|
||||
gitdir,
|
||||
branch: branch_name(n),
|
||||
|
|
Loading…
Reference in a new issue