Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(terragrunt): remove .git from package name #28726

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/modules/manager/terragrunt/__fixtures__/2.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ terraform {

# gitlab-tags ssh with custom port
terraform {
source = "git::ssh://gitlab.com:1234/hashicorp/example?ref=v1.0.2"
source = "git::ssh://gitlab.com:1234/hashicorp/example.git?ref=v1.0.2"
}

# gitea-tags
Expand Down
2 changes: 1 addition & 1 deletion lib/modules/manager/terragrunt/__fixtures__/3.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ terraform {

# gitlab-tags ssh with custom port
terraform {
source = "git::ssh://gitlab.com:1234/hashicorp/example?ref=v1.0.2"
source = "git::ssh://gitlab.com:1234/hashicorp/example.git?ref=v1.0.2"
}

# gitea-tags
Expand Down
2 changes: 1 addition & 1 deletion lib/modules/manager/terragrunt/__fixtures__/4.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ terraform {

# gitlab-tags ssh with custom port
terraform {
source = "git::ssh://gitlab.com:1234/hashicorp/example?ref=v1.0.2"
source = "git::ssh://gitlab.com:1234/hashicorp/example.git?ref=v1.0.2"
}

# gitea-tags
Expand Down
5 changes: 4 additions & 1 deletion lib/modules/manager/terragrunt/modules.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,10 @@ export function analyseTerragruntModule(
}
} else {
// The packageName should only contain the path to the repository
dep.packageName = pathname.replace(/^\//, '').split('//')[0];
dep.packageName = pathname
viceice marked this conversation as resolved.
Show resolved Hide resolved
.replace(/^\//, '')
lstoeferle marked this conversation as resolved.
Show resolved Hide resolved
.replace('.git', '')
lstoeferle marked this conversation as resolved.
Show resolved Hide resolved
.split('//')[0];
dep.registryUrls = [
protocol === 'https:' ? `https://${host}` : `https://${hostname}`,
lstoeferle marked this conversation as resolved.
Show resolved Hide resolved
];
Expand Down