diff options
Diffstat (limited to 'models/packages')
-rw-r--r-- | models/packages/descriptor.go | 3 | ||||
-rw-r--r-- | models/packages/package.go | 5 |
2 files changed, 8 insertions, 0 deletions
diff --git a/models/packages/descriptor.go b/models/packages/descriptor.go index 31819ccca1..dc753421d0 100644 --- a/models/packages/descriptor.go +++ b/models/packages/descriptor.go @@ -19,6 +19,7 @@ import ( "code.gitea.io/gitea/modules/packages/maven" "code.gitea.io/gitea/modules/packages/npm" "code.gitea.io/gitea/modules/packages/nuget" + "code.gitea.io/gitea/modules/packages/pub" "code.gitea.io/gitea/modules/packages/pypi" "code.gitea.io/gitea/modules/packages/rubygems" @@ -143,6 +144,8 @@ func GetPackageDescriptor(ctx context.Context, pv *PackageVersion) (*PackageDesc metadata = &npm.Metadata{} case TypeMaven: metadata = &maven.Metadata{} + case TypePub: + metadata = &pub.Metadata{} case TypePyPI: metadata = &pypi.Metadata{} case TypeRubyGems: diff --git a/models/packages/package.go b/models/packages/package.go index 97cfbc6cad..39b1c83cfa 100644 --- a/models/packages/package.go +++ b/models/packages/package.go @@ -39,6 +39,7 @@ const ( TypeMaven Type = "maven" TypeNpm Type = "npm" TypeNuGet Type = "nuget" + TypePub Type = "pub" TypePyPI Type = "pypi" TypeRubyGems Type = "rubygems" ) @@ -62,6 +63,8 @@ func (pt Type) Name() string { return "npm" case TypeNuGet: return "NuGet" + case TypePub: + return "Pub" case TypePyPI: return "PyPI" case TypeRubyGems: @@ -89,6 +92,8 @@ func (pt Type) SVGName() string { return "gitea-npm" case TypeNuGet: return "gitea-nuget" + case TypePub: + return "gitea-pub" case TypePyPI: return "gitea-python" case TypeRubyGems: |