Commit 670eee68 authored by Andy Soiron's avatar Andy Soiron

Merge branch '337596-fix-rubocop-offenses-4' into 'master'

Fix Rubocop Graphql/Description offenses [RUN AS-IF-FOSS]

See merge request gitlab-org/gitlab!68422
parents 6f9481a6 ef7a3f4e
...@@ -23,30 +23,6 @@ Graphql/Descriptions: ...@@ -23,30 +23,6 @@ Graphql/Descriptions:
- 'ee/app/graphql/types/vulnerability_severity_enum.rb' - 'ee/app/graphql/types/vulnerability_severity_enum.rb'
- 'ee/app/graphql/types/vulnerability_state_enum.rb' - 'ee/app/graphql/types/vulnerability_state_enum.rb'
- 'ee/app/graphql/types/vulnerability_confidence_enum.rb' - 'ee/app/graphql/types/vulnerability_confidence_enum.rb'
- 'app/graphql/resolvers/labels_resolver.rb'
- 'app/graphql/resolvers/merge_requests_resolver.rb'
- 'app/graphql/resolvers/milestones_resolver.rb'
- 'app/graphql/resolvers/package_details_resolver.rb'
- 'app/graphql/resolvers/paginated_tree_resolver.rb'
- 'app/graphql/resolvers/release_resolver.rb'
- 'app/graphql/resolvers/repository_branch_names_resolver.rb'
- 'app/graphql/resolvers/snippets_resolver.rb'
- 'app/graphql/resolvers/todo_resolver.rb'
- 'app/graphql/resolvers/tree_resolver.rb'
- 'app/graphql/resolvers/users/snippets_resolver.rb'
- 'app/graphql/types/admin/analytics/usage_trends/measurement_type.rb'
- 'app/graphql/types/admin/sidekiq_queues/delete_jobs_response_type.rb'
- 'app/graphql/types/alert_management/alert_type.rb'
- 'app/graphql/types/award_emojis/award_emoji_type.rb'
- 'app/graphql/types/ci/config/job_restriction_type.rb'
- 'app/graphql/types/ci/config/status_enum.rb'
- 'app/graphql/types/ci/pipeline_type.rb'
- 'app/graphql/types/ci_configuration/sast/ui_component_size_enum.rb'
- 'app/graphql/types/commit_action_type.rb'
- 'app/graphql/types/container_repository_cleanup_status_enum.rb'
- 'app/graphql/types/container_repository_tag_type.rb'
- 'app/graphql/types/container_repository_type.rb'
- 'app/graphql/types/custom_emoji_type.rb'
- 'app/graphql/types/design_management/design_at_version_type.rb' - 'app/graphql/types/design_management/design_at_version_type.rb'
- 'app/graphql/types/design_management/design_fields.rb' - 'app/graphql/types/design_management/design_fields.rb'
- 'app/graphql/types/diff_paths_input_type.rb' - 'app/graphql/types/diff_paths_input_type.rb'
......
...@@ -10,7 +10,7 @@ module Resolvers ...@@ -10,7 +10,7 @@ module Resolvers
argument :search_term, GraphQL::Types::String, argument :search_term, GraphQL::Types::String,
required: false, required: false,
description: 'A search term to find labels with.' description: 'Search term to find labels with.'
argument :include_ancestor_groups, GraphQL::Types::Boolean, argument :include_ancestor_groups, GraphQL::Types::Boolean,
required: false, required: false,
......
...@@ -49,7 +49,7 @@ module Resolvers ...@@ -49,7 +49,7 @@ module Resolvers
argument :state, ::Types::MergeRequestStateEnum, argument :state, ::Types::MergeRequestStateEnum,
required: false, required: false,
description: 'A merge request state. If provided, all resolved merge requests will have this state.' description: 'Merge request state. If provided, all resolved merge requests will have this state.'
argument :labels, [GraphQL::Types::String], argument :labels, [GraphQL::Types::String],
required: false, required: false,
......
...@@ -15,15 +15,15 @@ module Resolvers ...@@ -15,15 +15,15 @@ module Resolvers
argument :title, GraphQL::Types::String, argument :title, GraphQL::Types::String,
required: false, required: false,
description: 'The title of the milestone.' description: 'Title of the milestone.'
argument :search_title, GraphQL::Types::String, argument :search_title, GraphQL::Types::String,
required: false, required: false,
description: 'A search string for the title.' description: 'Search string for the title.'
argument :containing_date, Types::TimeType, argument :containing_date, Types::TimeType,
required: false, required: false,
description: 'A date that the milestone contains.' description: 'Date the milestone contains.'
argument :sort, Types::MilestoneSortEnum, argument :sort, Types::MilestoneSortEnum,
description: 'Sort milestones by this criteria.', description: 'Sort milestones by this criteria.',
......
...@@ -6,7 +6,7 @@ module Resolvers ...@@ -6,7 +6,7 @@ module Resolvers
argument :id, ::Types::GlobalIDType[::Packages::Package], argument :id, ::Types::GlobalIDType[::Packages::Package],
required: true, required: true,
description: 'The global ID of the package.' description: 'Global ID of the package.'
def ready?(**args) def ready?(**args)
context[self.class] ||= { executions: 0 } context[self.class] ||= { executions: 0 }
......
...@@ -10,11 +10,11 @@ module Resolvers ...@@ -10,11 +10,11 @@ module Resolvers
argument :path, GraphQL::Types::String, argument :path, GraphQL::Types::String,
required: false, required: false,
default_value: '', # root of the repository default_value: '', # root of the repository
description: 'The path to get the tree for. Default value is the root of the repository.' description: 'Path to get the tree for. Default value is the root of the repository.'
argument :ref, GraphQL::Types::String, argument :ref, GraphQL::Types::String,
required: false, required: false,
default_value: :head, default_value: :head,
description: 'The commit ref to get the tree for. Default value is HEAD.' description: 'Commit ref to get the tree for. Default value is HEAD.'
argument :recursive, GraphQL::Types::Boolean, argument :recursive, GraphQL::Types::Boolean,
required: false, required: false,
default_value: false, default_value: false,
......
...@@ -6,7 +6,7 @@ module Resolvers ...@@ -6,7 +6,7 @@ module Resolvers
argument :tag_name, GraphQL::Types::String, argument :tag_name, GraphQL::Types::String,
required: true, required: true,
description: 'The name of the tag associated to the release.' description: 'Name of the tag associated to the release.'
alias_method :project, :object alias_method :project, :object
......
...@@ -8,15 +8,15 @@ module Resolvers ...@@ -8,15 +8,15 @@ module Resolvers
argument :search_pattern, GraphQL::Types::String, argument :search_pattern, GraphQL::Types::String,
required: true, required: true,
description: 'The pattern to search for branch names by.' description: 'Pattern to search for branch names by.'
argument :offset, GraphQL::Types::Int, argument :offset, GraphQL::Types::Int,
required: true, required: true,
description: 'The number of branch names to skip.' description: 'Number of branch names to skip.'
argument :limit, GraphQL::Types::Int, argument :limit, GraphQL::Types::Int,
required: true, required: true,
description: 'The number of branch names to return.' description: 'Number of branch names to return.'
def resolve(search_pattern:, offset:, limit:) def resolve(search_pattern:, offset:, limit:)
Repositories::BranchNamesFinder.new(object, offset: offset, limit: limit, search: search_pattern).execute Repositories::BranchNamesFinder.new(object, offset: offset, limit: limit, search: search_pattern).execute
......
...@@ -12,15 +12,15 @@ module Resolvers ...@@ -12,15 +12,15 @@ module Resolvers
argument :author_id, ::Types::GlobalIDType[::User], argument :author_id, ::Types::GlobalIDType[::User],
required: false, required: false,
description: 'The ID of an author.' description: 'ID of an author.'
argument :project_id, ::Types::GlobalIDType[::Project], argument :project_id, ::Types::GlobalIDType[::Project],
required: false, required: false,
description: 'The ID of a project.' description: 'ID of a project.'
argument :type, Types::Snippets::TypeEnum, argument :type, Types::Snippets::TypeEnum,
required: false, required: false,
description: 'The type of snippet.' description: 'Type of snippet.'
argument :explore, argument :explore,
GraphQL::Types::Boolean, GraphQL::Types::Boolean,
......
...@@ -8,27 +8,27 @@ module Resolvers ...@@ -8,27 +8,27 @@ module Resolvers
argument :action, [Types::TodoActionEnum], argument :action, [Types::TodoActionEnum],
required: false, required: false,
description: 'The action to be filtered.' description: 'Action to be filtered.'
argument :author_id, [GraphQL::Types::ID], argument :author_id, [GraphQL::Types::ID],
required: false, required: false,
description: 'The ID of an author.' description: 'ID of an author.'
argument :project_id, [GraphQL::Types::ID], argument :project_id, [GraphQL::Types::ID],
required: false, required: false,
description: 'The ID of a project.' description: 'ID of a project.'
argument :group_id, [GraphQL::Types::ID], argument :group_id, [GraphQL::Types::ID],
required: false, required: false,
description: 'The ID of a group.' description: 'ID of a group.'
argument :state, [Types::TodoStateEnum], argument :state, [Types::TodoStateEnum],
required: false, required: false,
description: 'The state of the todo.' description: 'State of the todo.'
argument :type, [Types::TodoTargetEnum], argument :type, [Types::TodoTargetEnum],
required: false, required: false,
description: 'The type of the todo.' description: 'Type of the todo.'
def resolve(**args) def resolve(**args)
return Todo.none unless current_user.present? && target.present? return Todo.none unless current_user.present? && target.present?
......
...@@ -9,11 +9,11 @@ module Resolvers ...@@ -9,11 +9,11 @@ module Resolvers
argument :path, GraphQL::Types::String, argument :path, GraphQL::Types::String,
required: false, required: false,
default_value: '', default_value: '',
description: 'The path to get the tree for. Default value is the root of the repository.' description: 'Path to get the tree for. Default value is the root of the repository.'
argument :ref, GraphQL::Types::String, argument :ref, GraphQL::Types::String,
required: false, required: false,
default_value: :head, default_value: :head,
description: 'The commit ref to get the tree for. Default value is HEAD.' description: 'Commit ref to get the tree for. Default value is HEAD.'
argument :recursive, GraphQL::Types::Boolean, argument :recursive, GraphQL::Types::Boolean,
required: false, required: false,
default_value: false, default_value: false,
......
...@@ -11,7 +11,7 @@ module Resolvers ...@@ -11,7 +11,7 @@ module Resolvers
argument :type, Types::Snippets::TypeEnum, argument :type, Types::Snippets::TypeEnum,
required: false, required: false,
description: 'The type of snippet.' description: 'Type of snippet.'
private private
......
...@@ -12,13 +12,13 @@ module Types ...@@ -12,13 +12,13 @@ module Types
authorize :read_usage_trends_measurement authorize :read_usage_trends_measurement
field :recorded_at, Types::TimeType, null: true, field :recorded_at, Types::TimeType, null: true,
description: 'The time the measurement was recorded.' description: 'Time the measurement was recorded.'
field :count, GraphQL::Types::Int, null: false, field :count, GraphQL::Types::Int, null: false,
description: 'Object count.' description: 'Object count.'
field :identifier, Types::Admin::Analytics::UsageTrends::MeasurementIdentifierEnum, null: false, field :identifier, Types::Admin::Analytics::UsageTrends::MeasurementIdentifierEnum, null: false,
description: 'The type of objects being measured.' description: 'Type of objects being measured.'
end end
end end
end end
......
...@@ -17,12 +17,12 @@ module Types ...@@ -17,12 +17,12 @@ module Types
field :deleted_jobs, field :deleted_jobs,
GraphQL::Types::Int, GraphQL::Types::Int,
null: true, null: true,
description: 'The number of matching jobs deleted.' description: 'Number of matching jobs deleted.'
field :queue_size, field :queue_size,
GraphQL::Types::Int, GraphQL::Types::Int,
null: true, null: true,
description: 'The queue size after processing.' description: 'Queue size after processing.'
end end
end end
end end
......
...@@ -122,12 +122,12 @@ module Types ...@@ -122,12 +122,12 @@ module Types
field :details_url, field :details_url,
GraphQL::Types::String, GraphQL::Types::String,
null: false, null: false,
description: 'The URL of the alert detail page.' description: 'URL of the alert detail page.'
field :prometheus_alert, field :prometheus_alert,
Types::PrometheusAlertType, Types::PrometheusAlertType,
null: true, null: true,
description: 'The alert condition for Prometheus.' description: 'Alert condition for Prometheus.'
def notes def notes
object.ordered_notes object.ordered_notes
......
...@@ -13,32 +13,32 @@ module Types ...@@ -13,32 +13,32 @@ module Types
field :name, field :name,
GraphQL::Types::String, GraphQL::Types::String,
null: false, null: false,
description: 'The emoji name.' description: 'Emoji name.'
field :description, field :description,
GraphQL::Types::String, GraphQL::Types::String,
null: false, null: false,
description: 'The emoji description.' description: 'Emoji description.'
field :unicode, field :unicode,
GraphQL::Types::String, GraphQL::Types::String,
null: false, null: false,
description: 'The emoji in Unicode.' description: 'Emoji in Unicode.'
field :emoji, field :emoji,
GraphQL::Types::String, GraphQL::Types::String,
null: false, null: false,
description: 'The emoji as an icon.' description: 'Emoji as an icon.'
field :unicode_version, field :unicode_version,
GraphQL::Types::String, GraphQL::Types::String,
null: false, null: false,
description: 'The Unicode version for this emoji.' description: 'Unicode version for this emoji.'
field :user, field :user,
Types::UserType, Types::UserType,
null: false, null: false,
description: 'The user who awarded the emoji.' description: 'User who awarded the emoji.'
def user def user
Gitlab::Graphql::Loaders::BatchModelLoader.new(User, object.user_id).find Gitlab::Graphql::Loaders::BatchModelLoader.new(User, object.user_id).find
......
...@@ -8,7 +8,7 @@ module Types ...@@ -8,7 +8,7 @@ module Types
graphql_name 'CiConfigJobRestriction' graphql_name 'CiConfigJobRestriction'
field :refs, [GraphQL::Types::String], null: true, field :refs, [GraphQL::Types::String], null: true,
description: 'The Git refs the job restriction applies to.' description: 'Git refs the job restriction applies to.'
end end
end end
end end
......
...@@ -7,8 +7,8 @@ module Types ...@@ -7,8 +7,8 @@ module Types
graphql_name 'CiConfigStatus' graphql_name 'CiConfigStatus'
description 'Values for YAML processor result' description 'Values for YAML processor result'
value 'VALID', 'The configuration file is valid.', value: :valid value 'VALID', 'Configuration file is valid.', value: :valid
value 'INVALID', 'The configuration file is not valid.', value: :invalid value 'INVALID', 'Configuration file is not valid.', value: :invalid
end end
end end
end end
......
...@@ -97,7 +97,7 @@ module Types ...@@ -97,7 +97,7 @@ module Types
type: ::Types::Ci::JobType, type: ::Types::Ci::JobType,
null: true, null: true,
authorize: :read_commit_status, authorize: :read_commit_status,
description: 'A specific job in this pipeline, either by name or ID.' do description: 'Specific job in this pipeline, either by name or ID.' do
argument :id, argument :id,
type: ::Types::GlobalIDType[::CommitStatus], type: ::Types::GlobalIDType[::CommitStatus],
required: false, required: false,
......
...@@ -7,9 +7,9 @@ module Types ...@@ -7,9 +7,9 @@ module Types
graphql_name 'SastUiComponentSize' graphql_name 'SastUiComponentSize'
description 'Size of UI component in SAST configuration page' description 'Size of UI component in SAST configuration page'
value 'SMALL', description: "The size of UI component in SAST configuration page is small." value 'SMALL', description: "Size of UI component in SAST configuration page is small."
value 'MEDIUM', description: "The size of UI component in SAST configuration page is medium." value 'MEDIUM', description: "Size of UI component in SAST configuration page is medium."
value 'LARGE', description: "The size of UI component in SAST configuration page is large." value 'LARGE', description: "Size of UI component in SAST configuration page is large."
end end
end end
end end
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
module Types module Types
class CommitActionType < BaseInputObject class CommitActionType < BaseInputObject
argument :action, type: Types::CommitActionModeEnum, required: true, argument :action, type: Types::CommitActionModeEnum, required: true,
description: 'The action to perform, create, delete, move, update, chmod.' description: 'Action to perform: create, delete, move, update, or chmod.'
argument :file_path, type: GraphQL::Types::String, required: true, argument :file_path, type: GraphQL::Types::String, required: true,
description: 'Full path to the file.' description: 'Full path to the file.'
argument :content, type: GraphQL::Types::String, required: false, argument :content, type: GraphQL::Types::String, required: false,
......
...@@ -5,9 +5,9 @@ module Types ...@@ -5,9 +5,9 @@ module Types
graphql_name 'ContainerRepositoryCleanupStatus' graphql_name 'ContainerRepositoryCleanupStatus'
description 'Status of the tags cleanup of a container repository' description 'Status of the tags cleanup of a container repository'
value 'UNSCHEDULED', value: 'cleanup_unscheduled', description: 'The tags cleanup is not scheduled. This is the default state.' value 'UNSCHEDULED', value: 'cleanup_unscheduled', description: 'Tags cleanup is not scheduled. This is the default state.'
value 'SCHEDULED', value: 'cleanup_scheduled', description: 'The tags cleanup is scheduled and is going to be executed shortly.' value 'SCHEDULED', value: 'cleanup_scheduled', description: 'Tags cleanup is scheduled and is going to be executed shortly.'
value 'UNFINISHED', value: 'cleanup_unfinished', description: 'The tags cleanup has been partially executed. There are still remaining tags to delete.' value 'UNFINISHED', value: 'cleanup_unfinished', description: 'Tags cleanup has been partially executed. There are still remaining tags to delete.'
value 'ONGOING', value: 'cleanup_ongoing', description: 'The tags cleanup is ongoing.' value 'ONGOING', value: 'cleanup_ongoing', description: 'Tags cleanup is ongoing.'
end end
end end
...@@ -14,7 +14,7 @@ module Types ...@@ -14,7 +14,7 @@ module Types
field :digest, GraphQL::Types::String, null: true, description: 'Digest of the tag.' field :digest, GraphQL::Types::String, null: true, description: 'Digest of the tag.'
field :revision, GraphQL::Types::String, null: true, description: 'Revision of the tag.' field :revision, GraphQL::Types::String, null: true, description: 'Revision of the tag.'
field :short_revision, GraphQL::Types::String, null: true, description: 'Short revision of the tag.' field :short_revision, GraphQL::Types::String, null: true, description: 'Short revision of the tag.'
field :total_size, GraphQL::Types::BigInt, null: true, description: 'The size of the tag.' field :total_size, GraphQL::Types::BigInt, null: true, description: 'Size of the tag.'
field :created_at, Types::TimeType, null: true, description: 'Timestamp when the tag was created.' field :created_at, Types::TimeType, null: true, description: 'Timestamp when the tag was created.'
field :can_delete, GraphQL::Types::Boolean, null: false, description: 'Can the current user delete this tag.' field :can_delete, GraphQL::Types::Boolean, null: false, description: 'Can the current user delete this tag.'
......
...@@ -15,7 +15,7 @@ module Types ...@@ -15,7 +15,7 @@ module Types
field :created_at, Types::TimeType, null: false, description: 'Timestamp when the container repository was created.' field :created_at, Types::TimeType, null: false, description: 'Timestamp when the container repository was created.'
field :updated_at, Types::TimeType, null: false, description: 'Timestamp when the container repository was updated.' field :updated_at, Types::TimeType, null: false, description: 'Timestamp when the container repository was updated.'
field :expiration_policy_started_at, Types::TimeType, null: true, description: 'Timestamp when the cleanup done by the expiration policy was started on the container repository.' field :expiration_policy_started_at, Types::TimeType, null: true, description: 'Timestamp when the cleanup done by the expiration policy was started on the container repository.'
field :expiration_policy_cleanup_status, Types::ContainerRepositoryCleanupStatusEnum, null: true, description: 'The tags cleanup status for the container repository.' field :expiration_policy_cleanup_status, Types::ContainerRepositoryCleanupStatusEnum, null: true, description: 'Tags cleanup status for the container repository.'
field :status, Types::ContainerRepositoryStatusEnum, null: true, description: 'Status of the container repository.' field :status, Types::ContainerRepositoryStatusEnum, null: true, description: 'Status of the container repository.'
field :tags_count, GraphQL::Types::Int, null: false, description: 'Number of tags associated with this image.' field :tags_count, GraphQL::Types::Int, null: false, description: 'Number of tags associated with this image.'
field :can_delete, GraphQL::Types::Boolean, null: false, description: 'Can the current user delete the container repository.' field :can_delete, GraphQL::Types::Boolean, null: false, description: 'Can the current user delete the container repository.'
......
...@@ -9,16 +9,16 @@ module Types ...@@ -9,16 +9,16 @@ module Types
field :id, ::Types::GlobalIDType[::CustomEmoji], field :id, ::Types::GlobalIDType[::CustomEmoji],
null: false, null: false,
description: 'The ID of the emoji.' description: 'ID of the emoji.'
field :name, GraphQL::Types::String, field :name, GraphQL::Types::String,
null: false, null: false,
description: 'The name of the emoji.' description: 'Name of the emoji.'
field :url, GraphQL::Types::String, field :url, GraphQL::Types::String,
null: false, null: false,
method: :file, method: :file,
description: 'The link to file of the emoji.' description: 'Link to file of the emoji.'
field :external, GraphQL::Types::Boolean, field :external, GraphQL::Types::Boolean,
null: false, null: false,
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment