summaryrefslogtreecommitdiff
path: root/app/graphql/mutations/releases
diff options
context:
space:
mode:
authorRobert Speicher <rspeicher@gmail.com>2021-01-20 13:34:23 -0600
committerRobert Speicher <rspeicher@gmail.com>2021-01-20 13:34:23 -0600
commit6438df3a1e0fb944485cebf07976160184697d72 (patch)
tree00b09bfd170e77ae9391b1a2f5a93ef6839f2597 /app/graphql/mutations/releases
parent42bcd54d971da7ef2854b896a7b34f4ef8601067 (diff)
downloadgitlab-ce-6438df3a1e0fb944485cebf07976160184697d72.tar.gz
Add latest changes from gitlab-org/gitlab@13-8-stable-eev13.8.0-rc42
Diffstat (limited to 'app/graphql/mutations/releases')
-rw-r--r--app/graphql/mutations/releases/base.rb2
-rw-r--r--app/graphql/mutations/releases/create.rb12
-rw-r--r--app/graphql/mutations/releases/update.rb16
3 files changed, 15 insertions, 15 deletions
diff --git a/app/graphql/mutations/releases/base.rb b/app/graphql/mutations/releases/base.rb
index d53cfbe6a11..dd1724fe320 100644
--- a/app/graphql/mutations/releases/base.rb
+++ b/app/graphql/mutations/releases/base.rb
@@ -7,7 +7,7 @@ module Mutations
argument :project_path, GraphQL::ID_TYPE,
required: true,
- description: 'Full path of the project the release is associated with'
+ description: 'Full path of the project the release is associated with.'
private
diff --git a/app/graphql/mutations/releases/create.rb b/app/graphql/mutations/releases/create.rb
index 156cd252848..91ac256033e 100644
--- a/app/graphql/mutations/releases/create.rb
+++ b/app/graphql/mutations/releases/create.rb
@@ -8,23 +8,23 @@ module Mutations
field :release,
Types::ReleaseType,
null: true,
- description: 'The release after mutation'
+ description: 'The release after mutation.'
argument :tag_name, GraphQL::STRING_TYPE,
required: true, as: :tag,
- description: 'Name of the tag to associate with the release'
+ description: 'Name of the tag to associate with the release.'
argument :ref, GraphQL::STRING_TYPE,
required: false,
- description: 'The commit SHA or branch name to use if creating a new tag'
+ description: 'The commit SHA or branch name to use if creating a new tag.'
argument :name, GraphQL::STRING_TYPE,
required: false,
- description: 'Name of the release'
+ description: 'Name of the release.'
argument :description, GraphQL::STRING_TYPE,
required: false,
- description: 'Description (also known as "release notes") of the release'
+ description: 'Description (also known as "release notes") of the release.'
argument :released_at, Types::TimeType,
required: false,
@@ -36,7 +36,7 @@ module Mutations
argument :assets, Types::ReleaseAssetsInputType,
required: false,
- description: 'Assets associated to the release'
+ description: 'Assets associated to the release.'
authorize :create_release
diff --git a/app/graphql/mutations/releases/update.rb b/app/graphql/mutations/releases/update.rb
index bf72b907679..dff743254bd 100644
--- a/app/graphql/mutations/releases/update.rb
+++ b/app/graphql/mutations/releases/update.rb
@@ -12,19 +12,19 @@ module Mutations
argument :tag_name, GraphQL::STRING_TYPE,
required: true, as: :tag,
- description: 'Name of the tag associated with the release'
+ description: 'Name of the tag associated with the release.'
argument :name, GraphQL::STRING_TYPE,
required: false,
- description: 'Name of the release'
+ description: 'Name of the release.'
argument :description, GraphQL::STRING_TYPE,
required: false,
- description: 'Description (release notes) of the release'
+ description: 'Description (release notes) of the release.'
argument :released_at, Types::TimeType,
required: false,
- description: 'The release date'
+ description: 'The release date.'
argument :milestones, [GraphQL::STRING_TYPE],
required: false,
@@ -51,17 +51,17 @@ module Mutations
params = scalars.with_indifferent_access
- release_result = ::Releases::UpdateService.new(project, current_user, params).execute
+ result = ::Releases::UpdateService.new(project, current_user, params).execute
- if release_result[:status] == :success
+ if result[:status] == :success
{
- release: release_result[:release],
+ release: result[:release],
errors: []
}
else
{
release: nil,
- errors: [release_result[:message]]
+ errors: [result[:message]]
}
end
end