Commit d7507505 authored by Luke Duncalfe's avatar Luke Duncalfe

Fix Rubocop Graphql/Description offenses

https://gitlab.com/gitlab-org/gitlab/-/issues/337596
parent b2c45ffd
...@@ -23,28 +23,6 @@ Graphql/Descriptions: ...@@ -23,28 +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'
- 'ee/app/graphql/mutations/app_sec/fuzzing/api/ci_configuration/create.rb'
- 'ee/app/graphql/mutations/boards/epic_boards/create.rb'
- 'ee/app/graphql/mutations/boards/epic_boards/epic_move_list.rb'
- 'ee/app/graphql/mutations/boards/epic_boards/update.rb'
- 'ee/app/graphql/mutations/boards/epic_lists/destroy.rb'
- 'ee/app/graphql/mutations/boards/lists/update_limit_metrics.rb'
- 'ee/app/graphql/mutations/boards/update_epic_user_preferences.rb'
- 'ee/app/graphql/mutations/compliance_management/frameworks/create.rb'
- 'ee/app/graphql/mutations/compliance_management/frameworks/destroy.rb'
- 'ee/app/graphql/mutations/compliance_management/frameworks/update.rb'
- 'ee/app/graphql/mutations/concerns/mutations/shared_epic_arguments.rb'
- 'ee/app/graphql/mutations/dast/profiles/create.rb'
- 'ee/app/graphql/mutations/dast/profiles/update.rb'
- 'ee/app/graphql/mutations/dast_on_demand_scans/create.rb'
- 'ee/app/graphql/mutations/dast_scanner_profiles/create.rb'
- 'ee/app/graphql/mutations/dast_scanner_profiles/update.rb'
- 'ee/app/graphql/mutations/dast_site_profiles/create.rb'
- 'ee/app/graphql/mutations/dast_site_profiles/delete.rb'
- 'ee/app/graphql/mutations/dast_site_profiles/update.rb'
- 'ee/app/graphql/mutations/dast_site_tokens/create.rb'
- 'ee/app/graphql/mutations/dast_site_validations/create.rb'
- 'ee/app/graphql/mutations/dast_site_validations/revoke.rb'
- 'ee/app/graphql/mutations/epic_tree/reorder.rb' - 'ee/app/graphql/mutations/epic_tree/reorder.rb'
- 'ee/app/graphql/mutations/epics/add_issue.rb' - 'ee/app/graphql/mutations/epics/add_issue.rb'
- 'ee/app/graphql/mutations/epics/base.rb' - 'ee/app/graphql/mutations/epics/base.rb'
......
This diff is collapsed.
...@@ -29,7 +29,7 @@ module Mutations ...@@ -29,7 +29,7 @@ module Mutations
argument :scan_mode, ::Types::AppSec::Fuzzing::API::ScanModeEnum, argument :scan_mode, ::Types::AppSec::Fuzzing::API::ScanModeEnum,
required: true, required: true,
description: 'The mode for API fuzzing scans.' description: 'Mode for API fuzzing scans.'
argument :scan_profile, GraphQL::Types::String, argument :scan_profile, GraphQL::Types::String,
required: false, required: false,
...@@ -46,7 +46,7 @@ module Mutations ...@@ -46,7 +46,7 @@ module Mutations
field :gitlab_ci_yaml_edit_path, GraphQL::Types::String, field :gitlab_ci_yaml_edit_path, GraphQL::Types::String,
null: true, null: true,
description: "The location at which the project's `.gitlab-ci.yml` file can be edited in the browser." description: "Location at which the project's `.gitlab-ci.yml` file can be edited in the browser."
authorize :create_vulnerability authorize :create_vulnerability
......
...@@ -19,7 +19,7 @@ module Mutations ...@@ -19,7 +19,7 @@ module Mutations
field :epic_board, field :epic_board,
Types::Boards::EpicBoardType, Types::Boards::EpicBoardType,
null: true, null: true,
description: 'The created epic board.' description: 'Created epic board.'
def resolve(args) def resolve(args)
group_path = args.delete(:group_path) group_path = args.delete(:group_path)
......
...@@ -35,7 +35,7 @@ module Mutations ...@@ -35,7 +35,7 @@ module Mutations
field :epic, field :epic,
Types::EpicType, Types::EpicType,
null: true, null: true,
description: 'The epic after mutation.' description: 'Epic after mutation.'
def ready?(**args) def ready?(**args)
if args.slice(:from_list_id, :move_after_id, :move_before_id).empty? if args.slice(:from_list_id, :move_after_id, :move_before_id).empty?
......
...@@ -14,12 +14,12 @@ module Mutations ...@@ -14,12 +14,12 @@ module Mutations
argument :id, argument :id,
::Types::GlobalIDType[::Boards::EpicBoard], ::Types::GlobalIDType[::Boards::EpicBoard],
required: true, required: true,
description: 'The epic board global ID.' description: 'Epic board global ID.'
field :epic_board, field :epic_board,
Types::Boards::EpicBoardType, Types::Boards::EpicBoardType,
null: true, null: true,
description: 'The updated epic board.' description: 'Updated epic board.'
def resolve(**args) def resolve(**args)
board = authorized_find!(id: args[:id]) board = authorized_find!(id: args[:id])
......
...@@ -15,7 +15,7 @@ module Mutations ...@@ -15,7 +15,7 @@ module Mutations
field :list, field :list,
Types::Boards::EpicListType, Types::Boards::EpicListType,
null: true, null: true,
description: 'The epic board list. `null` if the board was destroyed successfully.' description: 'Epic board list. `null` if the board was destroyed successfully.'
authorize :admin_epic_board_list authorize :admin_epic_board_list
......
...@@ -9,27 +9,27 @@ module Mutations ...@@ -9,27 +9,27 @@ module Mutations
argument :list_id, argument :list_id,
::Types::GlobalIDType[::List], ::Types::GlobalIDType[::List],
required: true, required: true,
description: 'The global ID of the list.' description: 'Global ID of the list.'
argument :limit_metric, argument :limit_metric,
EE::Types::ListLimitMetricEnum, EE::Types::ListLimitMetricEnum,
required: false, required: false,
description: 'The new limit metric type for the list.' description: 'New limit metric type for the list.'
argument :max_issue_count, argument :max_issue_count,
GraphQL::Types::Int, GraphQL::Types::Int,
required: false, required: false,
description: 'The new maximum issue count limit.' description: 'New maximum issue count limit.'
argument :max_issue_weight, argument :max_issue_weight,
GraphQL::Types::Int, GraphQL::Types::Int,
required: false, required: false,
description: 'The new maximum issue weight limit.' description: 'New maximum issue weight limit.'
field :list, field :list,
::Types::BoardListType, ::Types::BoardListType,
null: true, null: true,
description: 'The updated list.' description: 'Updated list.'
def ready?(**args) def ready?(**args)
if limit_metric_settings_of(args).blank? if limit_metric_settings_of(args).blank?
......
...@@ -8,7 +8,7 @@ module Mutations ...@@ -8,7 +8,7 @@ module Mutations
argument :board_id, argument :board_id,
::Types::GlobalIDType[::Board], ::Types::GlobalIDType[::Board],
required: true, required: true,
description: 'The board global ID.' description: 'Board global ID.'
argument :epic_id, argument :epic_id,
::Types::GlobalIDType[::Epic], ::Types::GlobalIDType[::Epic],
......
...@@ -9,7 +9,7 @@ module Mutations ...@@ -9,7 +9,7 @@ module Mutations
field :framework, field :framework,
Types::ComplianceManagement::ComplianceFrameworkType, Types::ComplianceManagement::ComplianceFrameworkType,
null: true, null: true,
description: 'The created compliance framework.' description: 'Created compliance framework.'
argument :namespace_path, GraphQL::Types::ID, argument :namespace_path, GraphQL::Types::ID,
required: true, required: true,
......
...@@ -11,7 +11,7 @@ module Mutations ...@@ -11,7 +11,7 @@ module Mutations
argument :id, argument :id,
::Types::GlobalIDType[::ComplianceManagement::Framework], ::Types::GlobalIDType[::ComplianceManagement::Framework],
required: true, required: true,
description: 'The global ID of the compliance framework to destroy.' description: 'Global ID of the compliance framework to destroy.'
def resolve(id:) def resolve(id:)
framework = authorized_find!(id: id) framework = authorized_find!(id: id)
......
...@@ -11,7 +11,7 @@ module Mutations ...@@ -11,7 +11,7 @@ module Mutations
argument :id, argument :id,
::Types::GlobalIDType[::ComplianceManagement::Framework], ::Types::GlobalIDType[::ComplianceManagement::Framework],
required: true, required: true,
description: 'The global ID of the compliance framework to update.' description: 'Global ID of the compliance framework to update.'
argument :params, Types::ComplianceManagement::ComplianceFrameworkInputType, argument :params, Types::ComplianceManagement::ComplianceFrameworkInputType,
required: true, required: true,
...@@ -20,7 +20,7 @@ module Mutations ...@@ -20,7 +20,7 @@ module Mutations
field :compliance_framework, field :compliance_framework,
Types::ComplianceManagement::ComplianceFrameworkType, Types::ComplianceManagement::ComplianceFrameworkType,
null: true, null: true,
description: "The compliance framework after mutation." description: "Compliance framework after mutation."
def resolve(id:, **args) def resolve(id:, **args)
framework = authorized_find!(id: id) framework = authorized_find!(id: id)
......
...@@ -7,17 +7,17 @@ module Mutations ...@@ -7,17 +7,17 @@ module Mutations
prepended do prepended do
argument :group_path, GraphQL::Types::ID, argument :group_path, GraphQL::Types::ID,
required: true, required: true,
description: "The group the epic to mutate is in." description: "Group the epic to mutate is in."
argument :title, argument :title,
GraphQL::Types::String, GraphQL::Types::String,
required: false, required: false,
description: 'The title of the epic.' description: 'Title of the epic.'
argument :description, argument :description,
GraphQL::Types::String, GraphQL::Types::String,
required: false, required: false,
description: 'The description of the epic.' description: 'Description of the epic.'
argument :confidential, argument :confidential,
GraphQL::Types::Boolean, GraphQL::Types::Boolean,
...@@ -27,12 +27,12 @@ module Mutations ...@@ -27,12 +27,12 @@ module Mutations
argument :start_date_fixed, argument :start_date_fixed,
GraphQL::Types::String, GraphQL::Types::String,
required: false, required: false,
description: 'The start date of the epic.' description: 'Start date of the epic.'
argument :due_date_fixed, argument :due_date_fixed,
GraphQL::Types::String, GraphQL::Types::String,
required: false, required: false,
description: 'The end date of the epic.' description: 'End date of the epic.'
argument :start_date_is_fixed, argument :start_date_is_fixed,
GraphQL::Types::Boolean, GraphQL::Types::Boolean,
...@@ -46,11 +46,11 @@ module Mutations ...@@ -46,11 +46,11 @@ module Mutations
argument :add_label_ids, argument :add_label_ids,
[GraphQL::Types::ID], [GraphQL::Types::ID],
required: false, required: false,
description: 'The IDs of labels to be added to the epic.' description: 'IDs of labels to be added to the epic.'
argument :remove_label_ids, argument :remove_label_ids,
[GraphQL::Types::ID], [GraphQL::Types::ID],
required: false, required: false,
description: 'The IDs of labels to be removed from the epic.' description: 'IDs of labels to be removed from the epic.'
end end
def validate_arguments!(args) def validate_arguments!(args)
......
...@@ -10,28 +10,28 @@ module Mutations ...@@ -10,28 +10,28 @@ module Mutations
field :dast_profile, ::Types::Dast::ProfileType, field :dast_profile, ::Types::Dast::ProfileType,
null: true, null: true,
description: 'The created profile.' description: 'Created profile.'
field :pipeline_url, GraphQL::Types::String, field :pipeline_url, GraphQL::Types::String,
null: true, null: true,
description: 'The URL of the pipeline that was created. Requires `runAfterCreate` to be set to `true`.' description: 'URL of the pipeline that was created. Requires `runAfterCreate` to be set to `true`.'
argument :full_path, GraphQL::Types::ID, argument :full_path, GraphQL::Types::ID,
required: true, required: true,
description: 'The project the profile belongs to.' description: 'Project the profile belongs to.'
argument :name, GraphQL::Types::String, argument :name, GraphQL::Types::String,
required: true, required: true,
description: 'The name of the profile.' description: 'Name of the profile.'
argument :description, GraphQL::Types::String, argument :description, GraphQL::Types::String,
required: false, required: false,
description: 'The description of the profile. Defaults to an empty string.', description: 'Description of the profile. Defaults to an empty string.',
default_value: '' default_value: ''
argument :branch_name, GraphQL::Types::String, argument :branch_name, GraphQL::Types::String,
required: false, required: false,
description: 'The associated branch.' description: 'Associated branch.'
argument :dast_site_profile_id, ::Types::GlobalIDType[::DastSiteProfile], argument :dast_site_profile_id, ::Types::GlobalIDType[::DastSiteProfile],
required: true, required: true,
......
...@@ -14,7 +14,7 @@ module Mutations ...@@ -14,7 +14,7 @@ module Mutations
field :dast_profile, ::Types::Dast::ProfileType, field :dast_profile, ::Types::Dast::ProfileType,
null: true, null: true,
description: 'The updated profile.' description: 'Updated profile.'
field :pipeline_url, GraphQL::Types::String, field :pipeline_url, GraphQL::Types::String,
null: true, null: true,
...@@ -28,20 +28,20 @@ module Mutations ...@@ -28,20 +28,20 @@ module Mutations
argument :full_path, GraphQL::Types::ID, argument :full_path, GraphQL::Types::ID,
required: true, required: true,
description: 'The project the profile belongs to.' description: 'Project the profile belongs to.'
argument :name, GraphQL::Types::String, argument :name, GraphQL::Types::String,
required: false, required: false,
description: 'The name of the profile.' description: 'Name of the profile.'
argument :description, GraphQL::Types::String, argument :description, GraphQL::Types::String,
required: false, required: false,
description: 'The description of the profile. Defaults to an empty string.', description: 'Description of the profile. Defaults to an empty string.',
default_value: '' default_value: ''
argument :branch_name, GraphQL::Types::String, argument :branch_name, GraphQL::Types::String,
required: false, required: false,
description: 'The associated branch.' description: 'Associated branch.'
argument :dast_site_profile_id, SiteProfileID, argument :dast_site_profile_id, SiteProfileID,
required: false, required: false,
......
...@@ -15,7 +15,7 @@ module Mutations ...@@ -15,7 +15,7 @@ module Mutations
argument :full_path, GraphQL::Types::ID, argument :full_path, GraphQL::Types::ID,
required: true, required: true,
description: 'The project the site profile belongs to.' description: 'Project the site profile belongs to.'
argument :dast_site_profile_id, ::Types::GlobalIDType[::DastSiteProfile], argument :dast_site_profile_id, ::Types::GlobalIDType[::DastSiteProfile],
required: true, required: true,
......
...@@ -13,19 +13,19 @@ module Mutations ...@@ -13,19 +13,19 @@ module Mutations
argument :full_path, GraphQL::Types::ID, argument :full_path, GraphQL::Types::ID,
required: true, required: true,
description: 'The project the scanner profile belongs to.' description: 'Project the scanner profile belongs to.'
argument :profile_name, GraphQL::Types::String, argument :profile_name, GraphQL::Types::String,
required: true, required: true,
description: 'The name of the scanner profile.' description: 'Name of the scanner profile.'
argument :spider_timeout, GraphQL::Types::Int, argument :spider_timeout, GraphQL::Types::Int,
required: false, required: false,
description: 'The maximum number of minutes allowed for the spider to traverse the site.' description: 'Maximum number of minutes allowed for the spider to traverse the site.'
argument :target_timeout, GraphQL::Types::Int, argument :target_timeout, GraphQL::Types::Int,
required: false, required: false,
description: 'The maximum number of seconds allowed for the site under test to respond to a request.' description: 'Maximum number of seconds allowed for the site under test to respond to a request.'
argument :scan_type, Types::DastScanTypeEnum, argument :scan_type, Types::DastScanTypeEnum,
required: false, required: false,
......
...@@ -13,7 +13,7 @@ module Mutations ...@@ -13,7 +13,7 @@ module Mutations
argument :full_path, GraphQL::Types::ID, argument :full_path, GraphQL::Types::ID,
required: true, required: true,
description: 'The project the scanner profile belongs to.' description: 'Project the scanner profile belongs to.'
argument :id, ::Types::GlobalIDType[::DastScannerProfile], argument :id, ::Types::GlobalIDType[::DastScannerProfile],
required: true, required: true,
...@@ -21,15 +21,15 @@ module Mutations ...@@ -21,15 +21,15 @@ module Mutations
argument :profile_name, GraphQL::Types::String, argument :profile_name, GraphQL::Types::String,
required: true, required: true,
description: 'The name of the scanner profile.' description: 'Name of the scanner profile.'
argument :spider_timeout, GraphQL::Types::Int, argument :spider_timeout, GraphQL::Types::Int,
required: true, required: true,
description: 'The maximum number of minutes allowed for the spider to traverse the site.' description: 'Maximum number of minutes allowed for the spider to traverse the site.'
argument :target_timeout, GraphQL::Types::Int, argument :target_timeout, GraphQL::Types::Int,
required: true, required: true,
description: 'The maximum number of seconds allowed for the site under test to respond to a request.' description: 'Maximum number of seconds allowed for the site under test to respond to a request.'
argument :scan_type, Types::DastScanTypeEnum, argument :scan_type, Types::DastScanTypeEnum,
required: false, required: false,
......
...@@ -13,24 +13,24 @@ module Mutations ...@@ -13,24 +13,24 @@ module Mutations
argument :full_path, GraphQL::Types::ID, argument :full_path, GraphQL::Types::ID,
required: true, required: true,
description: 'The project the site profile belongs to.' description: 'Project the site profile belongs to.'
argument :profile_name, GraphQL::Types::String, argument :profile_name, GraphQL::Types::String,
required: true, required: true,
description: 'The name of the site profile.' description: 'Name of the site profile.'
argument :target_url, GraphQL::Types::String, argument :target_url, GraphQL::Types::String,
required: false, required: false,
description: 'The URL of the target to be scanned.' description: 'URL of the target to be scanned.'
argument :target_type, Types::DastTargetTypeEnum, argument :target_type, Types::DastTargetTypeEnum,
required: false, required: false,
description: 'The type of target to be scanned.' description: 'Type of target to be scanned.'
argument :excluded_urls, [GraphQL::Types::String], argument :excluded_urls, [GraphQL::Types::String],
required: false, required: false,
default_value: [], default_value: [],
description: 'The URLs to skip during an authenticated scan. Defaults to `[]`.' description: 'URLs to skip during an authenticated scan. Defaults to `[]`.'
argument :request_headers, GraphQL::Types::String, argument :request_headers, GraphQL::Types::String,
required: false, required: false,
......
...@@ -7,7 +7,7 @@ module Mutations ...@@ -7,7 +7,7 @@ module Mutations
argument :full_path, GraphQL::Types::ID, argument :full_path, GraphQL::Types::ID,
required: true, required: true,
description: 'The project the site profile belongs to.' description: 'Project the site profile belongs to.'
argument :id, ::Types::GlobalIDType[::DastSiteProfile], argument :id, ::Types::GlobalIDType[::DastSiteProfile],
required: true, required: true,
......
...@@ -15,7 +15,7 @@ module Mutations ...@@ -15,7 +15,7 @@ module Mutations
argument :full_path, GraphQL::Types::ID, argument :full_path, GraphQL::Types::ID,
required: true, required: true,
description: 'The project the site profile belongs to.' description: 'Project the site profile belongs to.'
argument :id, SiteProfileID, argument :id, SiteProfileID,
required: true, required: true,
...@@ -23,19 +23,19 @@ module Mutations ...@@ -23,19 +23,19 @@ module Mutations
argument :profile_name, GraphQL::Types::String, argument :profile_name, GraphQL::Types::String,
required: true, required: true,
description: 'The name of the site profile.' description: 'Name of the site profile.'
argument :target_url, GraphQL::Types::String, argument :target_url, GraphQL::Types::String,
required: false, required: false,
description: 'The URL of the target to be scanned.' description: 'URL of the target to be scanned.'
argument :target_type, Types::DastTargetTypeEnum, argument :target_type, Types::DastTargetTypeEnum,
required: false, required: false,
description: 'The type of target to be scanned.' description: 'Type of target to be scanned.'
argument :excluded_urls, [GraphQL::Types::String], argument :excluded_urls, [GraphQL::Types::String],
required: false, required: false,
description: 'The URLs to skip during an authenticated scan.' description: 'URLs to skip during an authenticated scan.'
argument :request_headers, GraphQL::Types::String, argument :request_headers, GraphQL::Types::String,
required: false, required: false,
......
...@@ -17,15 +17,15 @@ module Mutations ...@@ -17,15 +17,15 @@ module Mutations
field :status, Types::DastSiteProfileValidationStatusEnum, field :status, Types::DastSiteProfileValidationStatusEnum,
null: true, null: true,
description: 'The current validation status of the target.' description: 'Current validation status of the target.'
argument :full_path, GraphQL::Types::ID, argument :full_path, GraphQL::Types::ID,
required: true, required: true,
description: 'The project the site token belongs to.' description: 'Project the site token belongs to.'
argument :target_url, GraphQL::Types::String, argument :target_url, GraphQL::Types::String,
required: false, required: false,
description: 'The URL of the target to be validated.' description: 'URL of the target to be validated.'
authorize :create_on_demand_dast_scan authorize :create_on_demand_dast_scan
......
...@@ -13,11 +13,11 @@ module Mutations ...@@ -13,11 +13,11 @@ module Mutations
field :status, ::Types::DastSiteProfileValidationStatusEnum, field :status, ::Types::DastSiteProfileValidationStatusEnum,
null: true, null: true,
description: 'The current validation status.' description: 'Current validation status.'
argument :full_path, GraphQL::Types::ID, argument :full_path, GraphQL::Types::ID,
required: true, required: true,
description: 'The project the site profile belongs to.' description: 'Project the site profile belongs to.'
argument :dast_site_token_id, ::Types::GlobalIDType[::DastSiteToken], argument :dast_site_token_id, ::Types::GlobalIDType[::DastSiteToken],
required: true, required: true,
...@@ -25,11 +25,11 @@ module Mutations ...@@ -25,11 +25,11 @@ module Mutations
argument :validation_path, GraphQL::Types::String, argument :validation_path, GraphQL::Types::String,
required: true, required: true,
description: 'The path to be requested during validation.' description: 'Path to be requested during validation.'
argument :strategy, ::Types::DastSiteValidationStrategyEnum, argument :strategy, ::Types::DastSiteValidationStrategyEnum,
required: false, required: false,
description: 'The validation strategy to be used.' description: 'Validation strategy to be used.'
authorize :create_on_demand_dast_scan authorize :create_on_demand_dast_scan
......
...@@ -9,7 +9,7 @@ module Mutations ...@@ -9,7 +9,7 @@ module Mutations
argument :full_path, GraphQL::Types::ID, argument :full_path, GraphQL::Types::ID,
required: true, required: true,
description: 'The project the site validation belongs to.' description: 'Project the site validation belongs to.'
argument :normalized_target_url, GraphQL::Types::String, argument :normalized_target_url, GraphQL::Types::String,
required: true, required: true,
......
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