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>2020-06-18 21:08:58 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-06-18 21:08:58 +0300
commited16c9434ed73f68f84935b3b283baeacc632200 (patch)
tree4a75983976d001d9bb275a345f9f5fcf40685c6b /app/graphql
parent874c603d7a21724885ed24f15f457146aa1497c2 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/graphql')
-rw-r--r--app/graphql/types/release_links_type.rb23
-rw-r--r--app/graphql/types/release_type.rb2
2 files changed, 25 insertions, 0 deletions
diff --git a/app/graphql/types/release_links_type.rb b/app/graphql/types/release_links_type.rb
new file mode 100644
index 00000000000..f61a16f5b67
--- /dev/null
+++ b/app/graphql/types/release_links_type.rb
@@ -0,0 +1,23 @@
+# frozen_string_literal: true
+
+module Types
+ class ReleaseLinksType < BaseObject
+ graphql_name 'ReleaseLinks'
+
+ authorize :download_code
+
+ alias_method :release, :object
+
+ present_using ReleasePresenter
+
+ field :self_url, GraphQL::STRING_TYPE, null: true,
+ description: 'HTTP URL of the release'
+ field :merge_requests_url, GraphQL::STRING_TYPE, null: true,
+ description: 'HTTP URL of the merge request page filtered by this release'
+ field :issues_url, GraphQL::STRING_TYPE, null: true,
+ description: 'HTTP URL of the issues page filtered by this release'
+ field :edit_url, GraphQL::STRING_TYPE, null: true,
+ description: "HTTP URL of the release's edit page",
+ authorize: :update_release
+ end
+end
diff --git a/app/graphql/types/release_type.rb b/app/graphql/types/release_type.rb
index f900b476da9..a0703b96a36 100644
--- a/app/graphql/types/release_type.rb
+++ b/app/graphql/types/release_type.rb
@@ -28,6 +28,8 @@ module Types
description: 'Timestamp of when the release was released'
field :assets, Types::ReleaseAssetsType, null: true, method: :itself,
description: 'Assets of the release'
+ field :links, Types::ReleaseLinksType, null: true, method: :itself,
+ description: 'Links of the release'
field :milestones, Types::MilestoneType.connection_type, null: true,
description: 'Milestones associated to the release'
field :evidences, Types::EvidenceType.connection_type, null: true,