diff options
Diffstat (limited to 'models')
-rw-r--r-- | models/packages/descriptor.go | 3 | ||||
-rw-r--r-- | models/packages/package.go | 25 |
2 files changed, 18 insertions, 10 deletions
diff --git a/models/packages/descriptor.go b/models/packages/descriptor.go index 3249260f80..fbdc40f37f 100644 --- a/models/packages/descriptor.go +++ b/models/packages/descriptor.go @@ -15,6 +15,7 @@ import ( "code.gitea.io/gitea/modules/packages/composer" "code.gitea.io/gitea/modules/packages/conan" "code.gitea.io/gitea/modules/packages/container" + "code.gitea.io/gitea/modules/packages/helm" "code.gitea.io/gitea/modules/packages/maven" "code.gitea.io/gitea/modules/packages/npm" "code.gitea.io/gitea/modules/packages/nuget" @@ -129,6 +130,8 @@ func GetPackageDescriptor(ctx context.Context, pv *PackageVersion) (*PackageDesc metadata = &container.Metadata{} case TypeGeneric: // generic packages have no metadata + case TypeHelm: + metadata = &helm.Metadata{} case TypeNuGet: metadata = &nuget.Metadata{} case TypeNpm: diff --git a/models/packages/package.go b/models/packages/package.go index 373bd86d9f..bdb535492b 100644 --- a/models/packages/package.go +++ b/models/packages/package.go @@ -35,9 +35,10 @@ const ( TypeConan Type = "conan" TypeContainer Type = "container" TypeGeneric Type = "generic" - TypeNuGet Type = "nuget" - TypeNpm Type = "npm" + TypeHelm Type = "helm" TypeMaven Type = "maven" + TypeNpm Type = "npm" + TypeNuGet Type = "nuget" TypePyPI Type = "pypi" TypeRubyGems Type = "rubygems" ) @@ -53,12 +54,14 @@ func (pt Type) Name() string { return "Container" case TypeGeneric: return "Generic" - case TypeNuGet: - return "NuGet" - case TypeNpm: - return "npm" + case TypeHelm: + return "Helm" case TypeMaven: return "Maven" + case TypeNpm: + return "npm" + case TypeNuGet: + return "NuGet" case TypePyPI: return "PyPI" case TypeRubyGems: @@ -78,12 +81,14 @@ func (pt Type) SVGName() string { return "octicon-container" case TypeGeneric: return "octicon-package" - case TypeNuGet: - return "gitea-nuget" - case TypeNpm: - return "gitea-npm" + case TypeHelm: + return "gitea-helm" case TypeMaven: return "gitea-maven" + case TypeNpm: + return "gitea-npm" + case TypeNuGet: + return "gitea-nuget" case TypePyPI: return "gitea-python" case TypeRubyGems: |