Commit cf4848c4 authored by Luke Duncalfe's avatar Luke Duncalfe Committed by Alex Kalderimis

Fix Rubocop Graphql/Description offenses

https://gitlab.com/gitlab-org/gitlab/-/issues/337596
parent d59437fc
...@@ -22,35 +22,6 @@ Graphql/Descriptions: ...@@ -22,35 +22,6 @@ Graphql/Descriptions:
- 'ee/app/graphql/types/vulnerability_report_type_enum.rb' - 'ee/app/graphql/types/vulnerability_report_type_enum.rb'
- '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'
- 'app/graphql/mutations/admin/sidekiq_queues/delete_jobs.rb'
- 'app/graphql/mutations/alert_management/alerts/set_assignees.rb'
- 'app/graphql/mutations/alert_management/base.rb'
- 'app/graphql/mutations/alert_management/http_integration/create.rb'
- 'app/graphql/mutations/alert_management/http_integration/destroy.rb'
- 'app/graphql/mutations/alert_management/http_integration/http_integration_base.rb'
- 'app/graphql/mutations/alert_management/http_integration/reset_token.rb'
- 'app/graphql/mutations/alert_management/http_integration/update.rb'
- 'app/graphql/mutations/alert_management/prometheus_integration/create.rb'
- 'app/graphql/mutations/alert_management/prometheus_integration/prometheus_integration_base.rb'
- 'app/graphql/mutations/alert_management/prometheus_integration/reset_token.rb'
- 'app/graphql/mutations/alert_management/prometheus_integration/update.rb'
- 'app/graphql/mutations/alert_management/update_alert_status.rb'
- 'app/graphql/mutations/award_emojis/base.rb'
- 'app/graphql/mutations/boards/common_mutation_arguments.rb'
- 'app/graphql/mutations/boards/create.rb'
- 'app/graphql/mutations/boards/destroy.rb'
- 'app/graphql/mutations/boards/lists/destroy.rb'
- 'app/graphql/mutations/boards/update.rb'
- 'app/graphql/mutations/ci/ci_cd_settings_update.rb'
- 'app/graphql/mutations/ci/job/base.rb'
- 'app/graphql/mutations/ci/job/play.rb'
- 'app/graphql/mutations/ci/job/retry.rb'
- 'app/graphql/mutations/ci/job_token_scope/add_project.rb'
- 'app/graphql/mutations/ci/job_token_scope/remove_project.rb'
- 'app/graphql/mutations/ci/pipeline/base.rb'
- 'app/graphql/mutations/ci/pipeline/retry.rb'
- 'app/graphql/mutations/ci/runner/update.rb'
- 'app/graphql/mutations/ci/runners_registration_token/reset.rb'
- 'app/graphql/mutations/commits/create.rb' - 'app/graphql/mutations/commits/create.rb'
- 'app/graphql/mutations/concerns/mutations/assignable.rb' - 'app/graphql/mutations/concerns/mutations/assignable.rb'
- 'app/graphql/mutations/concerns/mutations/can_mutate_spammable.rb' - 'app/graphql/mutations/concerns/mutations/can_mutate_spammable.rb'
......
...@@ -18,7 +18,7 @@ module Mutations ...@@ -18,7 +18,7 @@ module Mutations
argument :queue_name, argument :queue_name,
GraphQL::Types::String, GraphQL::Types::String,
required: true, required: true,
description: 'The name of the queue to delete jobs from.' description: 'Name of the queue to delete jobs from.'
field :result, field :result,
Types::Admin::SidekiqQueues::DeleteJobsResponseType, Types::Admin::SidekiqQueues::DeleteJobsResponseType,
......
...@@ -9,12 +9,12 @@ module Mutations ...@@ -9,12 +9,12 @@ module Mutations
argument :assignee_usernames, argument :assignee_usernames,
[GraphQL::Types::String], [GraphQL::Types::String],
required: true, required: true,
description: 'The usernames to assign to the alert. Replaces existing assignees by default.' description: 'Usernames to assign to the alert. Replaces existing assignees by default.'
argument :operation_mode, argument :operation_mode,
Types::MutationOperationModeEnum, Types::MutationOperationModeEnum,
required: false, required: false,
description: 'The operation to perform. Defaults to REPLACE.' description: 'Operation to perform. Defaults to REPLACE.'
def resolve(args) def resolve(args)
alert = authorized_find!(project_path: args[:project_path], iid: args[:iid]) alert = authorized_find!(project_path: args[:project_path], iid: args[:iid])
......
...@@ -7,26 +7,26 @@ module Mutations ...@@ -7,26 +7,26 @@ module Mutations
argument :project_path, GraphQL::Types::ID, argument :project_path, GraphQL::Types::ID,
required: true, required: true,
description: "The project the alert to mutate is in." description: "Project the alert to mutate is in."
argument :iid, GraphQL::Types::String, argument :iid, GraphQL::Types::String,
required: true, required: true,
description: "The IID of the alert to mutate." description: "IID of the alert to mutate."
field :alert, field :alert,
Types::AlertManagement::AlertType, Types::AlertManagement::AlertType,
null: true, null: true,
description: "The alert after mutation." description: "Alert after mutation."
field :todo, field :todo,
Types::TodoType, Types::TodoType,
null: true, null: true,
description: "The to-do item after mutation." description: "To-do item after mutation."
field :issue, field :issue,
Types::IssueType, Types::IssueType,
null: true, null: true,
description: "The issue created after mutation." description: "Issue created after mutation."
authorize :update_alert_management_alert authorize :update_alert_management_alert
......
...@@ -10,11 +10,11 @@ module Mutations ...@@ -10,11 +10,11 @@ module Mutations
argument :project_path, GraphQL::Types::ID, argument :project_path, GraphQL::Types::ID,
required: true, required: true,
description: 'The project to create the integration in.' description: 'Project to create the integration in.'
argument :name, GraphQL::Types::String, argument :name, GraphQL::Types::String,
required: true, required: true,
description: 'The name of the integration.' description: 'Name of the integration.'
argument :active, GraphQL::Types::Boolean, argument :active, GraphQL::Types::Boolean,
required: true, required: true,
......
...@@ -8,7 +8,7 @@ module Mutations ...@@ -8,7 +8,7 @@ module Mutations
argument :id, Types::GlobalIDType[::AlertManagement::HttpIntegration], argument :id, Types::GlobalIDType[::AlertManagement::HttpIntegration],
required: true, required: true,
description: "The ID of the integration to remove." description: "ID of the integration to remove."
def resolve(id:) def resolve(id:)
integration = authorized_find!(id: id) integration = authorized_find!(id: id)
......
...@@ -7,7 +7,7 @@ module Mutations ...@@ -7,7 +7,7 @@ module Mutations
field :integration, field :integration,
Types::AlertManagement::HttpIntegrationType, Types::AlertManagement::HttpIntegrationType,
null: true, null: true,
description: "The HTTP integration." description: "HTTP integration."
authorize :admin_operations authorize :admin_operations
......
...@@ -8,7 +8,7 @@ module Mutations ...@@ -8,7 +8,7 @@ module Mutations
argument :id, Types::GlobalIDType[::AlertManagement::HttpIntegration], argument :id, Types::GlobalIDType[::AlertManagement::HttpIntegration],
required: true, required: true,
description: "The ID of the integration to mutate." description: "ID of the integration to mutate."
def resolve(id:) def resolve(id:)
integration = authorized_find!(id: id) integration = authorized_find!(id: id)
......
...@@ -8,11 +8,11 @@ module Mutations ...@@ -8,11 +8,11 @@ module Mutations
argument :id, Types::GlobalIDType[::AlertManagement::HttpIntegration], argument :id, Types::GlobalIDType[::AlertManagement::HttpIntegration],
required: true, required: true,
description: "The ID of the integration to mutate." description: "ID of the integration to mutate."
argument :name, GraphQL::Types::String, argument :name, GraphQL::Types::String,
required: false, required: false,
description: "The name of the integration." description: "Name of the integration."
argument :active, GraphQL::Types::Boolean, argument :active, GraphQL::Types::Boolean,
required: false, required: false,
......
...@@ -10,7 +10,7 @@ module Mutations ...@@ -10,7 +10,7 @@ module Mutations
argument :project_path, GraphQL::Types::ID, argument :project_path, GraphQL::Types::ID,
required: true, required: true,
description: 'The project to create the integration in.' description: 'Project to create the integration in.'
argument :active, GraphQL::Types::Boolean, argument :active, GraphQL::Types::Boolean,
required: true, required: true,
......
...@@ -7,7 +7,7 @@ module Mutations ...@@ -7,7 +7,7 @@ module Mutations
field :integration, field :integration,
Types::AlertManagement::PrometheusIntegrationType, Types::AlertManagement::PrometheusIntegrationType,
null: true, null: true,
description: "The newly created integration." description: "Newly created integration."
authorize :admin_project authorize :admin_project
......
...@@ -8,7 +8,7 @@ module Mutations ...@@ -8,7 +8,7 @@ module Mutations
argument :id, Types::GlobalIDType[::Integrations::Prometheus], argument :id, Types::GlobalIDType[::Integrations::Prometheus],
required: true, required: true,
description: "The ID of the integration to mutate." description: "ID of the integration to mutate."
def resolve(id:) def resolve(id:)
integration = authorized_find!(id: id) integration = authorized_find!(id: id)
......
...@@ -8,7 +8,7 @@ module Mutations ...@@ -8,7 +8,7 @@ module Mutations
argument :id, Types::GlobalIDType[::Integrations::Prometheus], argument :id, Types::GlobalIDType[::Integrations::Prometheus],
required: true, required: true,
description: "The ID of the integration to mutate." description: "ID of the integration to mutate."
argument :active, GraphQL::Types::Boolean, argument :active, GraphQL::Types::Boolean,
required: false, required: false,
......
...@@ -7,7 +7,7 @@ module Mutations ...@@ -7,7 +7,7 @@ module Mutations
argument :status, Types::AlertManagement::StatusEnum, argument :status, Types::AlertManagement::StatusEnum,
required: true, required: true,
description: 'The status to set the alert.' description: 'Status to set the alert.'
def resolve(project_path:, iid:, status:) def resolve(project_path:, iid:, status:)
alert = authorized_find!(project_path: project_path, iid: iid) alert = authorized_find!(project_path: project_path, iid: iid)
......
...@@ -12,7 +12,7 @@ module Mutations ...@@ -12,7 +12,7 @@ module Mutations
argument :awardable_id, argument :awardable_id,
::Types::GlobalIDType[::Awardable], ::Types::GlobalIDType[::Awardable],
required: true, required: true,
description: 'The global ID of the awardable resource.' description: 'Global ID of the awardable resource.'
argument :name, argument :name,
GraphQL::Types::String, GraphQL::Types::String,
...@@ -22,7 +22,7 @@ module Mutations ...@@ -22,7 +22,7 @@ module Mutations
field :award_emoji, field :award_emoji,
Types::AwardEmojis::AwardEmojiType, Types::AwardEmojis::AwardEmojiType,
null: true, null: true,
description: 'The award emoji after mutation.' description: 'Award emoji after mutation.'
private private
......
...@@ -9,7 +9,7 @@ module Mutations ...@@ -9,7 +9,7 @@ module Mutations
argument :name, argument :name,
GraphQL::Types::String, GraphQL::Types::String,
required: false, required: false,
description: 'The board name.' description: 'Board name.'
argument :hide_backlog_list, argument :hide_backlog_list,
GraphQL::Types::Boolean, GraphQL::Types::Boolean,
required: false, required: false,
......
...@@ -12,7 +12,7 @@ module Mutations ...@@ -12,7 +12,7 @@ module Mutations
field :board, field :board,
Types::BoardType, Types::BoardType,
null: true, null: true,
description: 'The board after mutation.' description: 'Board after mutation.'
authorize :admin_issue_board authorize :admin_issue_board
......
...@@ -8,11 +8,11 @@ module Mutations ...@@ -8,11 +8,11 @@ module Mutations
field :board, field :board,
Types::BoardType, Types::BoardType,
null: true, null: true,
description: 'The board after mutation.' description: 'Board after mutation.'
argument :id, argument :id,
::Types::GlobalIDType[::Board], ::Types::GlobalIDType[::Board],
required: true, required: true,
description: 'The global ID of the board to destroy.' description: 'Global ID of the board to destroy.'
authorize :admin_issue_board authorize :admin_issue_board
......
...@@ -9,7 +9,7 @@ module Mutations ...@@ -9,7 +9,7 @@ module Mutations
field :list, field :list,
Types::BoardListType, Types::BoardListType,
null: true, null: true,
description: 'The list after mutation.' description: 'List after mutation.'
argument :list_id, ::Types::GlobalIDType[::List], argument :list_id, ::Types::GlobalIDType[::List],
required: true, required: true,
......
...@@ -10,12 +10,12 @@ module Mutations ...@@ -10,12 +10,12 @@ module Mutations
argument :id, argument :id,
::Types::GlobalIDType[::Board], ::Types::GlobalIDType[::Board],
required: true, required: true,
description: 'The board global ID.' description: 'Board global ID.'
field :board, field :board,
Types::BoardType, Types::BoardType,
null: true, null: true,
description: 'The board after mutation.' description: 'Board after mutation.'
authorize :admin_issue_board authorize :admin_issue_board
......
...@@ -24,7 +24,7 @@ module Mutations ...@@ -24,7 +24,7 @@ module Mutations
field :ci_cd_settings, field :ci_cd_settings,
Types::Ci::CiCdSettingType, Types::Ci::CiCdSettingType,
null: false, null: false,
description: 'The CI/CD settings after mutation.' description: 'CI/CD settings after mutation.'
def resolve(full_path:, **args) def resolve(full_path:, **args)
project = authorized_find!(full_path) project = authorized_find!(full_path)
......
...@@ -8,7 +8,7 @@ module Mutations ...@@ -8,7 +8,7 @@ module Mutations
argument :id, JobID, argument :id, JobID,
required: true, required: true,
description: 'The ID of the job to mutate.' description: 'ID of the job to mutate.'
def find_object(id: ) def find_object(id: )
# TODO: remove this line when the compatibility layer is removed # TODO: remove this line when the compatibility layer is removed
......
...@@ -9,7 +9,7 @@ module Mutations ...@@ -9,7 +9,7 @@ module Mutations
field :job, field :job,
Types::Ci::JobType, Types::Ci::JobType,
null: true, null: true,
description: 'The job after the mutation.' description: 'Job after the mutation.'
authorize :update_build authorize :update_build
......
...@@ -9,7 +9,7 @@ module Mutations ...@@ -9,7 +9,7 @@ module Mutations
field :job, field :job,
Types::Ci::JobType, Types::Ci::JobType,
null: true, null: true,
description: 'The job after the mutation.' description: 'Job after the mutation.'
authorize :update_build authorize :update_build
......
...@@ -12,16 +12,16 @@ module Mutations ...@@ -12,16 +12,16 @@ module Mutations
argument :project_path, GraphQL::Types::ID, argument :project_path, GraphQL::Types::ID,
required: true, required: true,
description: 'The project that the CI job token scope belongs to.' description: 'Project that the CI job token scope belongs to.'
argument :target_project_path, GraphQL::Types::ID, argument :target_project_path, GraphQL::Types::ID,
required: true, required: true,
description: 'The project to be added to the CI job token scope.' description: 'Project to be added to the CI job token scope.'
field :ci_job_token_scope, field :ci_job_token_scope,
Types::Ci::JobTokenScopeType, Types::Ci::JobTokenScopeType,
null: true, null: true,
description: "The CI job token's scope of access." description: "CI job token's scope of access."
def resolve(project_path:, target_project_path:) def resolve(project_path:, target_project_path:)
project = authorized_find!(project_path) project = authorized_find!(project_path)
......
...@@ -12,16 +12,16 @@ module Mutations ...@@ -12,16 +12,16 @@ module Mutations
argument :project_path, GraphQL::Types::ID, argument :project_path, GraphQL::Types::ID,
required: true, required: true,
description: 'The project that the CI job token scope belongs to.' description: 'Project that the CI job token scope belongs to.'
argument :target_project_path, GraphQL::Types::ID, argument :target_project_path, GraphQL::Types::ID,
required: true, required: true,
description: 'The project to be removed from the CI job token scope.' description: 'Project to be removed from the CI job token scope.'
field :ci_job_token_scope, field :ci_job_token_scope,
Types::Ci::JobTokenScopeType, Types::Ci::JobTokenScopeType,
null: true, null: true,
description: "The CI job token's scope of access." description: "CI job token's scope of access."
def resolve(project_path:, target_project_path:) def resolve(project_path:, target_project_path:)
project = authorized_find!(project_path) project = authorized_find!(project_path)
......
...@@ -8,7 +8,7 @@ module Mutations ...@@ -8,7 +8,7 @@ module Mutations
argument :id, PipelineID, argument :id, PipelineID,
required: true, required: true,
description: 'The ID of the pipeline to mutate.' description: 'ID of the pipeline to mutate.'
private private
......
...@@ -9,7 +9,7 @@ module Mutations ...@@ -9,7 +9,7 @@ module Mutations
field :pipeline, field :pipeline,
Types::Ci::PipelineType, Types::Ci::PipelineType,
null: true, null: true,
description: 'The pipeline after mutation.' description: 'Pipeline after mutation.'
authorize :update_pipeline authorize :update_pipeline
......
...@@ -43,7 +43,7 @@ module Mutations ...@@ -43,7 +43,7 @@ module Mutations
field :runner, field :runner,
Types::Ci::RunnerType, Types::Ci::RunnerType,
null: true, null: true,
description: 'The runner after mutation.' description: 'Runner after mutation.'
def resolve(id:, **runner_attrs) def resolve(id:, **runner_attrs)
runner = authorized_find!(id) runner = authorized_find!(id)
......
...@@ -21,7 +21,7 @@ module Mutations ...@@ -21,7 +21,7 @@ module Mutations
field :token, field :token,
GraphQL::Types::String, GraphQL::Types::String,
null: true, null: true,
description: 'The runner token after mutation.' description: 'Runner token after mutation.'
def resolve(**args) def resolve(**args)
{ {
......
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