diff options
Diffstat (limited to 'app/graphql/mutations/releases')
-rw-r--r-- | app/graphql/mutations/releases/base.rb | 2 | ||||
-rw-r--r-- | app/graphql/mutations/releases/create.rb | 12 | ||||
-rw-r--r-- | app/graphql/mutations/releases/update.rb | 16 |
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 |