Commit ef7a3f4e authored by Luke Duncalfe's avatar Luke Duncalfe Committed by Andy Soiron

Fix Rubocop Graphql/Description offenses

parent 6791a6bf
......@@ -23,30 +23,6 @@ Graphql/Descriptions:
- 'ee/app/graphql/types/vulnerability_severity_enum.rb'
- 'ee/app/graphql/types/vulnerability_state_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_fields.rb'
- 'app/graphql/types/diff_paths_input_type.rb'
......
......@@ -10,7 +10,7 @@ module Resolvers
argument :search_term, GraphQL::Types::String,
required: false,
description: 'A search term to find labels with.'
description: 'Search term to find labels with.'
argument :include_ancestor_groups, GraphQL::Types::Boolean,
required: false,
......
......@@ -49,7 +49,7 @@ module Resolvers
argument :state, ::Types::MergeRequestStateEnum,
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],
required: false,
......
......@@ -15,15 +15,15 @@ module Resolvers
argument :title, GraphQL::Types::String,
required: false,
description: 'The title of the milestone.'
description: 'Title of the milestone.'
argument :search_title, GraphQL::Types::String,
required: false,
description: 'A search string for the title.'
description: 'Search string for the title.'
argument :containing_date, Types::TimeType,
required: false,
description: 'A date that the milestone contains.'
description: 'Date the milestone contains.'
argument :sort, Types::MilestoneSortEnum,
description: 'Sort milestones by this criteria.',
......
......@@ -6,7 +6,7 @@ module Resolvers
argument :id, ::Types::GlobalIDType[::Packages::Package],
required: true,
description: 'The global ID of the package.'
description: 'Global ID of the package.'
def ready?(**args)
context[self.class] ||= { executions: 0 }
......
......@@ -10,11 +10,11 @@ module Resolvers
argument :path, GraphQL::Types::String,
required: false,
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,
required: false,
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,
required: false,
default_value: false,
......
......@@ -6,7 +6,7 @@ module Resolvers
argument :tag_name, GraphQL::Types::String,
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
......
......@@ -8,15 +8,15 @@ module Resolvers
argument :search_pattern, GraphQL::Types::String,
required: true,
description: 'The pattern to search for branch names by.'
description: 'Pattern to search for branch names by.'
argument :offset, GraphQL::Types::Int,
required: true,
description: 'The number of branch names to skip.'
description: 'Number of branch names to skip.'
argument :limit, GraphQL::Types::Int,
required: true,
description: 'The number of branch names to return.'
description: 'Number of branch names to return.'
def resolve(search_pattern:, offset:, limit:)
Repositories::BranchNamesFinder.new(object, offset: offset, limit: limit, search: search_pattern).execute
......
......@@ -12,15 +12,15 @@ module Resolvers
argument :author_id, ::Types::GlobalIDType[::User],
required: false,
description: 'The ID of an author.'
description: 'ID of an author.'
argument :project_id, ::Types::GlobalIDType[::Project],
required: false,
description: 'The ID of a project.'
description: 'ID of a project.'
argument :type, Types::Snippets::TypeEnum,
required: false,
description: 'The type of snippet.'
description: 'Type of snippet.'
argument :explore,
GraphQL::Types::Boolean,
......
......@@ -8,27 +8,27 @@ module Resolvers
argument :action, [Types::TodoActionEnum],
required: false,
description: 'The action to be filtered.'
description: 'Action to be filtered.'
argument :author_id, [GraphQL::Types::ID],
required: false,
description: 'The ID of an author.'
description: 'ID of an author.'
argument :project_id, [GraphQL::Types::ID],
required: false,
description: 'The ID of a project.'
description: 'ID of a project.'
argument :group_id, [GraphQL::Types::ID],
required: false,
description: 'The ID of a group.'
description: 'ID of a group.'
argument :state, [Types::TodoStateEnum],
required: false,
description: 'The state of the todo.'
description: 'State of the todo.'
argument :type, [Types::TodoTargetEnum],
required: false,
description: 'The type of the todo.'
description: 'Type of the todo.'
def resolve(**args)
return Todo.none unless current_user.present? && target.present?
......
......@@ -9,11 +9,11 @@ module Resolvers
argument :path, GraphQL::Types::String,
required: false,
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,
required: false,
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,
required: false,
default_value: false,
......
......@@ -11,7 +11,7 @@ module Resolvers
argument :type, Types::Snippets::TypeEnum,
required: false,
description: 'The type of snippet.'
description: 'Type of snippet.'
private
......
......@@ -12,13 +12,13 @@ module Types
authorize :read_usage_trends_measurement
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,
description: 'Object count.'
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
......
......@@ -17,12 +17,12 @@ module Types
field :deleted_jobs,
GraphQL::Types::Int,
null: true,
description: 'The number of matching jobs deleted.'
description: 'Number of matching jobs deleted.'
field :queue_size,
GraphQL::Types::Int,
null: true,
description: 'The queue size after processing.'
description: 'Queue size after processing.'
end
end
end
......
......@@ -122,12 +122,12 @@ module Types
field :details_url,
GraphQL::Types::String,
null: false,
description: 'The URL of the alert detail page.'
description: 'URL of the alert detail page.'
field :prometheus_alert,
Types::PrometheusAlertType,
null: true,
description: 'The alert condition for Prometheus.'
description: 'Alert condition for Prometheus.'
def notes
object.ordered_notes
......
......@@ -13,32 +13,32 @@ module Types
field :name,
GraphQL::Types::String,
null: false,
description: 'The emoji name.'
description: 'Emoji name.'
field :description,
GraphQL::Types::String,
null: false,
description: 'The emoji description.'
description: 'Emoji description.'
field :unicode,
GraphQL::Types::String,
null: false,
description: 'The emoji in Unicode.'
description: 'Emoji in Unicode.'
field :emoji,
GraphQL::Types::String,
null: false,
description: 'The emoji as an icon.'
description: 'Emoji as an icon.'
field :unicode_version,
GraphQL::Types::String,
null: false,
description: 'The Unicode version for this emoji.'
description: 'Unicode version for this emoji.'
field :user,
Types::UserType,
null: false,
description: 'The user who awarded the emoji.'
description: 'User who awarded the emoji.'
def user
Gitlab::Graphql::Loaders::BatchModelLoader.new(User, object.user_id).find
......
......@@ -8,7 +8,7 @@ module Types
graphql_name 'CiConfigJobRestriction'
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
......
......@@ -7,8 +7,8 @@ module Types
graphql_name 'CiConfigStatus'
description 'Values for YAML processor result'
value 'VALID', 'The configuration file is valid.', value: :valid
value 'INVALID', 'The configuration file is not valid.', value: :invalid
value 'VALID', 'Configuration file is valid.', value: :valid
value 'INVALID', 'Configuration file is not valid.', value: :invalid
end
end
end
......
......@@ -97,7 +97,7 @@ module Types
type: ::Types::Ci::JobType,
null: true,
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,
type: ::Types::GlobalIDType[::CommitStatus],
required: false,
......
......@@ -7,9 +7,9 @@ module Types
graphql_name 'SastUiComponentSize'
description 'Size of UI component in SAST configuration page'
value 'SMALL', description: "The 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 'LARGE', description: "The size of UI component in SAST configuration page is large."
value 'SMALL', description: "Size of UI component in SAST configuration page is small."
value 'MEDIUM', description: "Size of UI component in SAST configuration page is medium."
value 'LARGE', description: "Size of UI component in SAST configuration page is large."
end
end
end
......
......@@ -3,7 +3,7 @@
module Types
class CommitActionType < BaseInputObject
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,
description: 'Full path to the file.'
argument :content, type: GraphQL::Types::String, required: false,
......
......@@ -5,9 +5,9 @@ module Types
graphql_name 'ContainerRepositoryCleanupStatus'
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 'SCHEDULED', value: 'cleanup_scheduled', description: 'The 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 'ONGOING', value: 'cleanup_ongoing', description: 'The tags cleanup is ongoing.'
value 'UNSCHEDULED', value: 'cleanup_unscheduled', description: 'Tags cleanup is not scheduled. This is the default state.'
value 'SCHEDULED', value: 'cleanup_scheduled', description: 'Tags cleanup is scheduled and is going to be executed shortly.'
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: 'Tags cleanup is ongoing.'
end
end
......@@ -14,7 +14,7 @@ module Types
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 :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 :can_delete, GraphQL::Types::Boolean, null: false, description: 'Can the current user delete this tag.'
......
......@@ -15,7 +15,7 @@ module Types
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 :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 :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.'
......
......@@ -9,16 +9,16 @@ module Types
field :id, ::Types::GlobalIDType[::CustomEmoji],
null: false,
description: 'The ID of the emoji.'
description: 'ID of the emoji.'
field :name, GraphQL::Types::String,
null: false,
description: 'The name of the emoji.'
description: 'Name of the emoji.'
field :url, GraphQL::Types::String,
null: false,
method: :file,
description: 'The link to file of the emoji.'
description: 'Link to file of the emoji.'
field :external, GraphQL::Types::Boolean,
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