chore: folder_name makes more sense as it's already in use

pull/287/head
Rie Takahashi 11 months ago
parent f0f0abe436
commit b6baaee4c7
No known key found for this signature in database
GPG Key ID: 196D4979177261AF

@ -50,7 +50,7 @@ variable "branch_name" {
default = ""
}
variable "dest_dir" {
variable "folder_name" {
description = "The destination folder to clone the repository into."
type = string
default = ""
@ -70,7 +70,7 @@ locals {
# Extract the branch name from the URL
branch_name = var.branch_name == "" && local.tree_path != "" ? replace(replace(local.url, local.clone_url, ""), "/.*${local.tree_path}/", "") : var.branch_name
# Extract the folder name from the URL
folder_name = var.dest_dir == "" ? replace(basename(local.clone_url), ".git", "") : var.dest_dir
folder_name = var.folder_name == "" ? replace(basename(local.clone_url), ".git", "") : var.folder_name
# Construct the path to clone the repository
clone_path = var.base_dir != "" ? join("/", [var.base_dir, local.folder_name]) : join("/", ["~", local.folder_name])
# Construct the web URL

Loading…
Cancel
Save