Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-01-07 21:16:06 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-01-07 21:16:06 +0300
commit8bac8f55ba93bb03f7391b939dc6644e67fe5216 (patch)
tree12cd1f579cb725050452fe4acf2d541253ad413f /app/graphql/types/packages/package_details_type.rb
parentc68ee79c332a9a08abaed7eb48fbc563a584d31d (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/graphql/types/packages/package_details_type.rb')
-rw-r--r--app/graphql/types/packages/package_details_type.rb43
1 files changed, 43 insertions, 0 deletions
diff --git a/app/graphql/types/packages/package_details_type.rb b/app/graphql/types/packages/package_details_type.rb
index 043cb7eff2b..07d8cf93b4e 100644
--- a/app/graphql/types/packages/package_details_type.rb
+++ b/app/graphql/types/packages/package_details_type.rb
@@ -3,6 +3,8 @@
module Types
module Packages
class PackageDetailsType < PackageType
+ include ::PackagesHelper
+
graphql_name 'PackageDetailsType'
description 'Represents a package details in the Package Registry. Note that this type is in beta and susceptible to changes'
authorize :read_package
@@ -21,6 +23,15 @@ module Types
description: 'Pipelines that built the package.',
deprecated: { reason: 'Due to scalability concerns, this field is going to be removed', milestone: '14.6' }
+ field :composer_config_repository_url, GraphQL::Types::String, null: true, description: 'Url of the Composer setup endpoint.'
+ field :composer_url, GraphQL::Types::String, null: true, description: 'Url of the Composer endpoint.'
+ field :conan_url, GraphQL::Types::String, null: true, description: 'Url of the Conan project endpoint.'
+ field :maven_url, GraphQL::Types::String, null: true, description: 'Url of the Maven project endpoint.'
+ field :npm_url, GraphQL::Types::String, null: true, description: 'Url of the NPM project endpoint.'
+ field :nuget_url, GraphQL::Types::String, null: true, description: 'Url of the Nuget project endpoint.'
+ field :pypi_setup_url, GraphQL::Types::String, null: true, description: 'Url of the PyPi project setup endpoint.'
+ field :pypi_url, GraphQL::Types::String, null: true, description: 'Url of the PyPi project endpoint.'
+
def versions
object.versions
end
@@ -32,6 +43,38 @@ module Types
object.package_files
end
end
+
+ def composer_config_repository_url
+ composer_config_repository_name(object.project.group&.id)
+ end
+
+ def composer_url
+ composer_registry_url(object.project.group&.id)
+ end
+
+ def conan_url
+ package_registry_project_url(object.project.id, :conan)
+ end
+
+ def maven_url
+ package_registry_project_url(object.project.id, :maven)
+ end
+
+ def npm_url
+ package_registry_project_url(object.project.id, :npm)
+ end
+
+ def nuget_url
+ nuget_package_registry_url(object.project.id)
+ end
+
+ def pypi_setup_url
+ package_registry_project_url(object.project.id, :pypi)
+ end
+
+ def pypi_url
+ pypi_registry_url(object.project.id)
+ end
end
end
end