Commit 8c8ba35f authored by Luke Duncalfe's avatar Luke Duncalfe

Fix Rubocop Graphql/Description offenses

https://gitlab.com/gitlab-org/gitlab/-/issues/337596
parent d3ecf7cb
...@@ -23,49 +23,6 @@ Graphql/Descriptions: ...@@ -23,49 +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/resolvers/dora_metrics_resolver.rb'
- 'ee/app/graphql/resolvers/geo/geo_node_resolver.rb'
- 'ee/app/graphql/resolvers/network_policy_resolver.rb'
- 'ee/app/graphql/resolvers/requirements_management/requirements_resolver.rb'
- 'ee/app/graphql/types/alert_management/payload_alert_field_input_type.rb'
- 'ee/app/graphql/types/alert_management/payload_alert_mapping_field_type.rb'
- 'ee/app/graphql/types/analytics/devops_adoption/snapshot_type.rb'
- 'ee/app/graphql/types/app_sec/fuzzing/api/scan_profile_type.rb'
- 'ee/app/graphql/types/ci/code_quality_degradation_type.rb'
- 'ee/app/graphql/types/ci/minutes/namespace_monthly_usage_type.rb'
- 'ee/app/graphql/types/ci/minutes/project_monthly_usage_type.rb'
- 'ee/app/graphql/types/clusters/agent_token_type.rb'
- 'ee/app/graphql/types/clusters/agent_type.rb'
- 'ee/app/graphql/types/dast/profile_branch_type.rb'
- 'ee/app/graphql/types/dast/profile_type.rb'
- 'ee/app/graphql/types/dast/site_profile_auth_input_type.rb'
- 'ee/app/graphql/types/dast/site_profile_auth_type.rb'
- 'ee/app/graphql/types/dast_scanner_profile_type.rb'
- 'ee/app/graphql/types/dast_site_profile_type.rb'
- 'ee/app/graphql/types/epic_tree/epic_tree_node_input_type.rb'
- 'ee/app/graphql/types/epic_type.rb'
- 'ee/app/graphql/types/geo/geo_node_type.rb'
- 'ee/app/graphql/types/incident_management/escalation_policy_type.rb'
- 'ee/app/graphql/types/incident_management/escalation_rule_input_type.rb'
- 'ee/app/graphql/types/incident_management/escalation_rule_type.rb'
- 'ee/app/graphql/types/incident_management/oncall_participant_type.rb'
- 'ee/app/graphql/types/incident_management/oncall_rotation_active_period_input_type.rb'
- 'ee/app/graphql/types/incident_management/oncall_rotation_active_period_type.rb'
- 'ee/app/graphql/types/incident_management/oncall_rotation_date_input_type.rb'
- 'ee/app/graphql/types/incident_management/oncall_rotation_length_input_type.rb'
- 'ee/app/graphql/types/incident_management/oncall_user_input_type.rb'
- 'ee/app/graphql/types/move_type_enum.rb'
- 'ee/app/graphql/types/network_policy_kind_enum.rb'
- 'ee/app/graphql/types/path_lock_type.rb'
- 'ee/app/graphql/types/pipeline_security_report_finding_type.rb'
- 'ee/app/graphql/types/scanned_resource_type.rb'
- 'ee/app/graphql/types/security_report_summary_section_type.rb'
- 'ee/app/graphql/types/timebox_metrics_type.rb'
- 'ee/app/graphql/types/vulnerability/issue_link_type.rb'
- 'ee/app/graphql/types/vulnerability_details/commit_type.rb'
- 'ee/app/graphql/types/vulnerability_type.rb'
- 'ee/app/graphql/types/vulnerable_dependency_type.rb'
- 'ee/app/graphql/types/vulnerable_package_type.rb'
# WIP: See https://gitlab.com/gitlab-org/gitlab/-/issues/220040 # WIP: See https://gitlab.com/gitlab-org/gitlab/-/issues/220040
Rails/SaveBang: Rails/SaveBang:
......
This diff is collapsed.
...@@ -11,7 +11,7 @@ module Resolvers ...@@ -11,7 +11,7 @@ module Resolvers
argument :metric, Types::DoraMetricTypeEnum, argument :metric, Types::DoraMetricTypeEnum,
required: true, required: true,
description: 'The type of metric to return.' description: 'Type of metric to return.'
argument :start_date, Types::DateType, argument :start_date, Types::DateType,
required: false, required: false,
...@@ -27,7 +27,7 @@ module Resolvers ...@@ -27,7 +27,7 @@ module Resolvers
argument :environment_tier, Types::DeploymentTierEnum, argument :environment_tier, Types::DeploymentTierEnum,
required: false, required: false,
description: 'The deployment tier of the environments to return. Defaults to `PRODUCTION`.' description: 'Deployment tier of the environments to return. Defaults to `PRODUCTION`.'
def resolve(params) def resolve(params)
result = ::Dora::AggregateMetricsService result = ::Dora::AggregateMetricsService
......
...@@ -7,7 +7,7 @@ module Resolvers ...@@ -7,7 +7,7 @@ module Resolvers
argument :name, GraphQL::Types::String, argument :name, GraphQL::Types::String,
required: false, required: false,
description: 'The name of the Geo node. Defaults to the current Geo node name.' description: 'Name of the Geo node. Defaults to the current Geo node name.'
def resolve(name: GeoNode.current_node_name) def resolve(name: GeoNode.current_node_name)
GeoNodeFinder.new(context[:current_user], names: [name]).execute.first GeoNodeFinder.new(context[:current_user], names: [name]).execute.first
......
...@@ -10,7 +10,7 @@ module Resolvers ...@@ -10,7 +10,7 @@ module Resolvers
argument :environment_id, argument :environment_id,
::Types::GlobalIDType[::Environment], ::Types::GlobalIDType[::Environment],
required: false, required: false,
description: 'The global ID of the environment to filter policies.' description: 'Global ID of the environment to filter policies.'
alias_method :project, :object alias_method :project, :object
......
...@@ -18,7 +18,7 @@ module Resolvers ...@@ -18,7 +18,7 @@ module Resolvers
argument :last_test_report_state, ::Types::RequirementsManagement::RequirementStatusFilterEnum, argument :last_test_report_state, ::Types::RequirementsManagement::RequirementStatusFilterEnum,
required: false, required: false,
description: 'The state of latest requirement test report.' description: 'State of latest requirement test report.'
def resolve_with_lookahead(**args) def resolve_with_lookahead(**args)
# The project could have been loaded in batch by `BatchLoader`. # The project could have been loaded in batch by `BatchLoader`.
......
...@@ -9,7 +9,7 @@ module Types ...@@ -9,7 +9,7 @@ module Types
argument :field_name, argument :field_name,
::Types::AlertManagement::PayloadAlertFieldNameEnum, ::Types::AlertManagement::PayloadAlertFieldNameEnum,
required: true, required: true,
description: 'A GitLab alert field name.' description: 'GitLab alert field name.'
argument :path, argument :path,
[::Types::AlertManagement::PayloadAlertFieldPathSegmentType], [::Types::AlertManagement::PayloadAlertFieldPathSegmentType],
......
...@@ -11,7 +11,7 @@ module Types ...@@ -11,7 +11,7 @@ module Types
field :field_name, field :field_name,
::Types::AlertManagement::PayloadAlertFieldNameEnum, ::Types::AlertManagement::PayloadAlertFieldNameEnum,
null: true, null: true,
description: 'A GitLab alert field name.' description: 'GitLab alert field name.'
field :path, field :path,
[::Types::AlertManagement::PayloadAlertFieldPathSegmentType], [::Types::AlertManagement::PayloadAlertFieldPathSegmentType],
......
...@@ -38,11 +38,11 @@ module Types ...@@ -38,11 +38,11 @@ module Types
field :total_projects_count, GraphQL::Types::Int, null: true, field :total_projects_count, GraphQL::Types::Int, null: true,
description: 'Total number of projects.' description: 'Total number of projects.'
field :recorded_at, Types::TimeType, null: false, field :recorded_at, Types::TimeType, null: false,
description: 'The time the snapshot was recorded.' description: 'Time the snapshot was recorded.'
field :start_time, Types::TimeType, null: false, field :start_time, Types::TimeType, null: false,
description: 'The start time for the snapshot where the data points were collected.' description: 'Start time for the snapshot where the data points were collected.'
field :end_time, Types::TimeType, null: false, field :end_time, Types::TimeType, null: false,
description: 'The end time for the snapshot where the data points were collected.' description: 'End time for the snapshot where the data points were collected.'
end end
end end
end end
......
...@@ -10,13 +10,13 @@ module Types ...@@ -10,13 +10,13 @@ module Types
description 'An API Fuzzing scan profile.' description 'An API Fuzzing scan profile.'
field :name, GraphQL::Types::String, null: true, field :name, GraphQL::Types::String, null: true,
description: 'The unique name of the profile.' description: 'Unique name of the profile.'
field :description, GraphQL::Types::String, null: true, field :description, GraphQL::Types::String, null: true,
description: 'A short description of the profile.' description: 'Short description of the profile.'
field :yaml, GraphQL::Types::String, null: true, field :yaml, GraphQL::Types::String, null: true,
description: 'A syntax highlit HTML representation of the YAML.' description: 'Syntax highlighted HTML representation of the YAML.'
end end
# rubocop: enable Graphql/AuthorizeTypes # rubocop: enable Graphql/AuthorizeTypes
end end
......
...@@ -12,23 +12,23 @@ module Types ...@@ -12,23 +12,23 @@ module Types
alias_method :degradation, :object alias_method :degradation, :object
field :description, GraphQL::Types::String, null: false, field :description, GraphQL::Types::String, null: false,
description: "A description of the code quality degradation." description: "Description of the code quality degradation."
field :fingerprint, GraphQL::Types::String, null: false, field :fingerprint, GraphQL::Types::String, null: false,
description: 'A unique fingerprint to identify the code quality degradation. For example, an MD5 hash.' description: 'Unique fingerprint to identify the code quality degradation. For example, an MD5 hash.'
field :severity, Types::Ci::CodeQualityDegradationSeverityEnum, null: false, field :severity, Types::Ci::CodeQualityDegradationSeverityEnum, null: false,
description: "Status of the degradation (#{::Gitlab::Ci::Reports::CodequalityReports::SEVERITY_PRIORITIES.keys.map(&:upcase).join(', ')})." description: "Status of the degradation (#{::Gitlab::Ci::Reports::CodequalityReports::SEVERITY_PRIORITIES.keys.map(&:upcase).join(', ')})."
field :path, GraphQL::Types::String, null: false, field :path, GraphQL::Types::String, null: false,
description: 'The relative path to the file containing the code quality degradation.' description: 'Relative path to the file containing the code quality degradation.'
def path def path
degradation.dig(:location, :path) degradation.dig(:location, :path)
end end
field :line, GraphQL::Types::Int, null: false, field :line, GraphQL::Types::Int, null: false,
description: 'The line on which the code quality degradation occurred.' description: 'Line on which the code quality degradation occurred.'
def line def line
degradation.dig(:location, :lines, :begin) || degradation.dig(:location, :positions, :begin, :line) degradation.dig(:location, :lines, :begin) || degradation.dig(:location, :positions, :begin, :line)
......
...@@ -9,11 +9,11 @@ module Types ...@@ -9,11 +9,11 @@ module Types
graphql_name 'CiMinutesNamespaceMonthlyUsage' graphql_name 'CiMinutesNamespaceMonthlyUsage'
field :month, ::GraphQL::STRING_TYPE, null: true, field :month, ::GraphQL::STRING_TYPE, null: true,
description: 'The month related to the usage data.' description: 'Month related to the usage data.'
field :minutes, ::GraphQL::INT_TYPE, null: true, field :minutes, ::GraphQL::INT_TYPE, null: true,
method: :amount_used, method: :amount_used,
description: 'The total number of minutes used by all projects in the namespace.' description: 'Total number of minutes used by all projects in the namespace.'
field :projects, ::Types::Ci::Minutes::ProjectMonthlyUsageType.connection_type, null: true, field :projects, ::Types::Ci::Minutes::ProjectMonthlyUsageType.connection_type, null: true,
description: 'CI minutes usage data for projects in the namespace.' description: 'CI minutes usage data for projects in the namespace.'
......
...@@ -10,10 +10,10 @@ module Types ...@@ -10,10 +10,10 @@ module Types
field :minutes, ::GraphQL::INT_TYPE, null: true, field :minutes, ::GraphQL::INT_TYPE, null: true,
method: :amount_used, method: :amount_used,
description: 'The number of CI minutes used by the project in the month.' description: 'Number of CI minutes used by the project in the month.'
field :name, ::GraphQL::STRING_TYPE, null: true, field :name, ::GraphQL::STRING_TYPE, null: true,
description: 'The name of the project.' description: 'Name of the project.'
def name def name
object.project.name object.project.name
......
...@@ -22,7 +22,7 @@ module Types ...@@ -22,7 +22,7 @@ module Types
field :created_by_user, field :created_by_user,
Types::UserType, Types::UserType,
null: true, null: true,
description: 'The user who created the token.' description: 'User who created the token.'
field :description, field :description,
GraphQL::Types::String, GraphQL::Types::String,
......
...@@ -29,7 +29,7 @@ module Types ...@@ -29,7 +29,7 @@ module Types
description: 'Name of the cluster agent.' description: 'Name of the cluster agent.'
field :project, Types::ProjectType, field :project, Types::ProjectType,
description: 'The project this cluster agent is associated with.', description: 'Project this cluster agent is associated with.',
null: true, null: true,
authorize: :read_project authorize: :read_project
......
...@@ -9,7 +9,7 @@ module Types ...@@ -9,7 +9,7 @@ module Types
authorize :read_on_demand_scans authorize :read_on_demand_scans
field :name, GraphQL::Types::String, null: true, field :name, GraphQL::Types::String, null: true,
description: 'The name of the branch.', description: 'Name of the branch.',
calls_gitaly: true calls_gitaly: true
field :exists, GraphQL::Types::Boolean, null: true, field :exists, GraphQL::Types::Boolean, null: true,
......
...@@ -12,23 +12,23 @@ module Types ...@@ -12,23 +12,23 @@ module Types
description: 'ID of the profile.' description: 'ID of the profile.'
field :name, GraphQL::Types::String, null: true, field :name, GraphQL::Types::String, null: true,
description: 'The name of the profile.' description: 'Name of the profile.'
field :description, GraphQL::Types::String, null: true, field :description, GraphQL::Types::String, null: true,
description: 'The description of the scan.' description: 'Description of the scan.'
field :dast_site_profile, DastSiteProfileType, null: true, field :dast_site_profile, DastSiteProfileType, null: true,
description: 'The associated site profile.' description: 'Associated site profile.'
field :dast_scanner_profile, DastScannerProfileType, null: true, field :dast_scanner_profile, DastScannerProfileType, null: true,
description: 'The associated scanner profile.' description: 'Associated scanner profile.'
field :dast_profile_schedule, ::Types::Dast::ProfileScheduleType, null: true, field :dast_profile_schedule, ::Types::Dast::ProfileScheduleType, null: true,
description: 'Associated profile schedule. Will always return `null` ' \ description: 'Associated profile schedule. Will always return `null` ' \
'if `dast_on_demand_scans_scheduler` feature flag is disabled.' 'if `dast_on_demand_scans_scheduler` feature flag is disabled.'
field :branch, Dast::ProfileBranchType, null: true, field :branch, Dast::ProfileBranchType, null: true,
description: 'The associated branch.', description: 'Associated branch.',
calls_gitaly: true calls_gitaly: true
field :edit_path, GraphQL::Types::String, null: true, field :edit_path, GraphQL::Types::String, null: true,
......
...@@ -17,19 +17,19 @@ module Types ...@@ -17,19 +17,19 @@ module Types
argument :username_field, GraphQL::Types::String, argument :username_field, GraphQL::Types::String,
required: false, required: false,
description: 'The name of username field at the sign-in HTML form.' description: 'Name of username field at the sign-in HTML form.'
argument :password_field, GraphQL::Types::String, argument :password_field, GraphQL::Types::String,
required: false, required: false,
description: 'The name of password field at the sign-in HTML form.' description: 'Name of password field at the sign-in HTML form.'
argument :username, GraphQL::Types::String, argument :username, GraphQL::Types::String,
required: false, required: false,
description: 'The username to authenticate with on the target website.' description: 'Username to authenticate with on the target website.'
argument :password, GraphQL::Types::String, argument :password, GraphQL::Types::String,
required: false, required: false,
description: 'The password to authenticate with on the target website.' description: 'Password to authenticate with on the target website.'
end end
end end
end end
...@@ -24,17 +24,17 @@ module Types ...@@ -24,17 +24,17 @@ module Types
field :username_field, GraphQL::Types::String, field :username_field, GraphQL::Types::String,
null: true, null: true,
method: :auth_username_field, method: :auth_username_field,
description: 'The name of username field at the sign-in HTML form.' description: 'Name of username field at the sign-in HTML form.'
field :password_field, GraphQL::Types::String, field :password_field, GraphQL::Types::String,
null: true, null: true,
method: :auth_password_field, method: :auth_password_field,
description: 'The name of password field at the sign-in HTML form.' description: 'Name of password field at the sign-in HTML form.'
field :username, GraphQL::Types::String, field :username, GraphQL::Types::String,
null: true, null: true,
method: :auth_username, method: :auth_username,
description: 'The username to authenticate with on the target website.' description: 'Username to authenticate with on the target website.'
field :password, GraphQL::Types::String, field :password, GraphQL::Types::String,
null: true, null: true,
......
...@@ -15,10 +15,10 @@ module Types ...@@ -15,10 +15,10 @@ module Types
method: :name method: :name
field :spider_timeout, GraphQL::Types::Int, null: true, field :spider_timeout, GraphQL::Types::Int, null: 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.'
field :target_timeout, GraphQL::Types::Int, null: true, field :target_timeout, GraphQL::Types::Int, null: 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.'
field :scan_type, Types::DastScanTypeEnum, null: true, field :scan_type, Types::DastScanTypeEnum, null: true,
description: 'Indicates the type of DAST scan that will run. ' \ description: 'Indicates the type of DAST scan that will run. ' \
......
...@@ -17,14 +17,14 @@ module Types ...@@ -17,14 +17,14 @@ module Types
description: 'ID of the site profile.' description: 'ID of the site profile.'
field :profile_name, GraphQL::Types::String, null: true, field :profile_name, GraphQL::Types::String, null: true,
description: 'The name of the site profile.', description: 'Name of the site profile.',
method: :name method: :name
field :target_url, GraphQL::Types::String, null: true, field :target_url, GraphQL::Types::String, null: true,
description: 'The URL of the target to be scanned.' description: 'URL of the target to be scanned.'
field :target_type, Types::DastTargetTypeEnum, null: true, field :target_type, Types::DastTargetTypeEnum, null: true,
description: 'The type of target to be scanned.' description: 'Type of target to be scanned.'
field :edit_path, GraphQL::Types::String, null: true, field :edit_path, GraphQL::Types::String, null: true,
description: 'Relative web path to the edit page of a site profile.' description: 'Relative web path to the edit page of a site profile.'
...@@ -33,14 +33,14 @@ module Types ...@@ -33,14 +33,14 @@ module Types
description: 'Target authentication details.' description: 'Target authentication details.'
field :excluded_urls, [GraphQL::Types::String], null: true, field :excluded_urls, [GraphQL::Types::String], null: true,
description: 'The URLs to skip during an authenticated scan.' description: 'URLs to skip during an authenticated scan.'
field :request_headers, GraphQL::Types::String, null: true, field :request_headers, GraphQL::Types::String, null: true,
description: 'Comma-separated list of request header names and values to be ' \ description: 'Comma-separated list of request header names and values to be ' \
'added to every request made by DAST.' 'added to every request made by DAST.'
field :validation_status, Types::DastSiteProfileValidationStatusEnum, null: true, field :validation_status, Types::DastSiteProfileValidationStatusEnum, null: true,
description: 'The current validation status of the site profile.', description: 'Current validation status of the site profile.',
method: :status method: :status
field :normalized_target_url, GraphQL::Types::String, null: true, field :normalized_target_url, GraphQL::Types::String, null: true,
......
...@@ -9,17 +9,17 @@ module Types ...@@ -9,17 +9,17 @@ module Types
argument :id, argument :id,
::Types::GlobalIDType[::EpicTreeSorting], ::Types::GlobalIDType[::EpicTreeSorting],
required: true, required: true,
description: 'The ID of the epic_issue or epic that is being moved.' description: 'ID of the epic issue or epic that is being moved.'
argument :adjacent_reference_id, argument :adjacent_reference_id,
::Types::GlobalIDType[::EpicTreeSorting], ::Types::GlobalIDType[::EpicTreeSorting],
required: false, required: false,
description: 'The ID of the epic_issue or issue that the actual epic or issue is switched with.' description: 'ID of the epic issue or issue the epic or issue is switched with.'
argument :relative_position, argument :relative_position,
MoveTypeEnum, MoveTypeEnum,
required: false, required: false,
description: 'The type of the switch, after or before allowed.' description: 'Type of switch. Valid values are `after` or `before`.'
argument :new_parent_id, argument :new_parent_id,
::Types::GlobalIDType[::Epic], ::Types::GlobalIDType[::Epic],
......
...@@ -104,7 +104,7 @@ module Types ...@@ -104,7 +104,7 @@ module Types
method: :group_epic_url method: :group_epic_url
field :relative_position, GraphQL::Types::Int, null: true, field :relative_position, GraphQL::Types::Int, null: true,
description: 'The relative position of the epic in the epic tree.' description: 'Relative position of the epic in the epic tree.'
field :relation_path, GraphQL::Types::String, null: true, field :relation_path, GraphQL::Types::String, null: true,
description: 'URI path of the epic-issue relationship.', description: 'URI path of the epic-issue relationship.',
method: :group_epic_link_path method: :group_epic_link_path
...@@ -145,7 +145,7 @@ module Types ...@@ -145,7 +145,7 @@ module Types
field :award_emoji, field :award_emoji,
Types::AwardEmojis::AwardEmojiType.connection_type, Types::AwardEmojis::AwardEmojiType.connection_type,
null: true, null: true,
description: 'A list of award emojis associated with the epic.', description: 'List of award emojis associated with the epic.',
authorize: :read_emoji authorize: :read_emoji
field :ancestors, Types::EpicType.connection_type, field :ancestors, Types::EpicType.connection_type,
......
...@@ -10,18 +10,18 @@ module Types ...@@ -10,18 +10,18 @@ module Types
field :id, GraphQL::Types::ID, null: false, description: 'ID of this GeoNode.' field :id, GraphQL::Types::ID, null: false, description: 'ID of this GeoNode.'
field :primary, GraphQL::Types::Boolean, null: true, description: 'Indicates whether this Geo node is the primary.' field :primary, GraphQL::Types::Boolean, null: true, description: 'Indicates whether this Geo node is the primary.'
field :enabled, GraphQL::Types::Boolean, null: true, description: 'Indicates whether this Geo node is enabled.' field :enabled, GraphQL::Types::Boolean, null: true, description: 'Indicates whether this Geo node is enabled.'
field :name, GraphQL::Types::String, null: true, description: 'The unique identifier for this Geo node.' field :name, GraphQL::Types::String, null: true, description: 'Unique identifier for this Geo node.'
field :url, GraphQL::Types::String, null: true, description: 'The user-facing URL for this Geo node.' field :url, GraphQL::Types::String, null: true, description: 'User-facing URL for this Geo node.'
field :internal_url, GraphQL::Types::String, null: true, description: 'The URL defined on the primary node that secondary nodes should use to contact it.' field :internal_url, GraphQL::Types::String, null: true, description: 'URL defined on the primary node secondary nodes should use to contact it.'
field :files_max_capacity, GraphQL::Types::Int, null: true, description: 'The maximum concurrency of LFS/attachment backfill for this secondary node.' field :files_max_capacity, GraphQL::Types::Int, null: true, description: 'Maximum concurrency of LFS/attachment backfill for this secondary node.'
field :repos_max_capacity, GraphQL::Types::Int, null: true, description: 'The maximum concurrency of repository backfill for this secondary node.' field :repos_max_capacity, GraphQL::Types::Int, null: true, description: 'Maximum concurrency of repository backfill for this secondary node.'
field :verification_max_capacity, GraphQL::Types::Int, null: true, description: 'The maximum concurrency of repository verification for this secondary node.' field :verification_max_capacity, GraphQL::Types::Int, null: true, description: 'Maximum concurrency of repository verification for this secondary node.'
field :container_repositories_max_capacity, GraphQL::Types::Int, null: true, description: 'The maximum concurrency of container repository sync for this secondary node.' field :container_repositories_max_capacity, GraphQL::Types::Int, null: true, description: 'Maximum concurrency of container repository sync for this secondary node.'
field :sync_object_storage, GraphQL::Types::Boolean, null: true, description: 'Indicates if this secondary node will replicate blobs in Object Storage.' field :sync_object_storage, GraphQL::Types::Boolean, null: true, description: 'Indicates if this secondary node will replicate blobs in Object Storage.'
field :selective_sync_type, GraphQL::Types::String, null: true, description: 'Indicates if syncing is limited to only specific groups, or shards.' field :selective_sync_type, GraphQL::Types::String, null: true, description: 'Indicates if syncing is limited to only specific groups, or shards.'
field :selective_sync_shards, type: [GraphQL::Types::String], null: true, description: 'The repository storages whose projects should be synced, if `selective_sync_type` == `shards`.' field :selective_sync_shards, type: [GraphQL::Types::String], null: true, description: 'Repository storages whose projects should be synced, if `selective_sync_type` == `shards`.'
field :selective_sync_namespaces, ::Types::NamespaceType.connection_type, null: true, method: :namespaces, description: 'The namespaces that should be synced, if `selective_sync_type` == `namespaces`.' field :selective_sync_namespaces, ::Types::NamespaceType.connection_type, null: true, method: :namespaces, description: 'Namespaces that should be synced, if `selective_sync_type` == `namespaces`.'
field :minimum_reverification_interval, GraphQL::Types::Int, null: true, description: 'The interval (in days) in which the repository verification is valid. Once expired, it will be reverified.' field :minimum_reverification_interval, GraphQL::Types::Int, null: true, description: 'Interval (in days) in which the repository verification is valid. After expiry, it is reverted.'
field :merge_request_diff_registries, ::Types::Geo::MergeRequestDiffRegistryType.connection_type, field :merge_request_diff_registries, ::Types::Geo::MergeRequestDiffRegistryType.connection_type,
null: true, null: true,
resolver: ::Resolvers::Geo::MergeRequestDiffRegistriesResolver, resolver: ::Resolvers::Geo::MergeRequestDiffRegistriesResolver,
......
...@@ -14,11 +14,11 @@ module Types ...@@ -14,11 +14,11 @@ module Types
field :name, GraphQL::Types::String, field :name, GraphQL::Types::String,
null: true, null: true,
description: 'The name of the escalation policy.' description: 'Name of the escalation policy.'
field :description, GraphQL::Types::String, field :description, GraphQL::Types::String,
null: true, null: true,
description: 'The description of the escalation policy.' description: 'Description of the escalation policy.'
field :rules, [Types::IncidentManagement::EscalationRuleType], field :rules, [Types::IncidentManagement::EscalationRuleType],
null: true, null: true,
......
...@@ -7,19 +7,19 @@ module Types ...@@ -7,19 +7,19 @@ module Types
description 'Represents an escalation rule' description 'Represents an escalation rule'
argument :oncall_schedule_iid, GraphQL::Types::ID, # rubocop: disable Graphql/IDType argument :oncall_schedule_iid, GraphQL::Types::ID, # rubocop: disable Graphql/IDType
description: 'The on-call schedule to notify.', description: 'On-call schedule to notify.',
required: false required: false
argument :username, GraphQL::Types::String, argument :username, GraphQL::Types::String,
description: 'The username of the user to notify.', description: 'Username of the user to notify.',
required: false required: false
argument :elapsed_time_seconds, GraphQL::Types::Int, argument :elapsed_time_seconds, GraphQL::Types::Int,
description: 'The time in seconds before the rule is activated.', description: 'Time in seconds before the rule is activated.',
required: true required: true
argument :status, Types::IncidentManagement::EscalationRuleStatusEnum, argument :status, Types::IncidentManagement::EscalationRuleStatusEnum,
description: 'The status required to prevent the rule from activating.', description: 'Status required to prevent the rule from activating.',
required: true required: true
def prepare def prepare
......
...@@ -13,19 +13,19 @@ module Types ...@@ -13,19 +13,19 @@ module Types
field :oncall_schedule, Types::IncidentManagement::OncallScheduleType, field :oncall_schedule, Types::IncidentManagement::OncallScheduleType,
null: true, null: true,
description: 'The on-call schedule to notify.' description: 'On-call schedule to notify.'
field :user, Types::UserType, field :user, Types::UserType,
null: true, null: true,
description: 'The user to notify.' description: 'User to notify.'
field :elapsed_time_seconds, GraphQL::Types::Int, field :elapsed_time_seconds, GraphQL::Types::Int,
null: true, null: true,
description: 'The time in seconds before the rule is activated.' description: 'Time in seconds before the rule is activated.'
field :status, Types::IncidentManagement::EscalationRuleStatusEnum, field :status, Types::IncidentManagement::EscalationRuleStatusEnum,
null: true, null: true,
description: 'The status required to prevent the rule from activating.' description: 'Status required to prevent the rule from activating.'
def oncall_schedule def oncall_schedule
Gitlab::Graphql::Loaders::BatchModelLoader.new(::IncidentManagement::OncallSchedule, object.oncall_schedule_id).find Gitlab::Graphql::Loaders::BatchModelLoader.new(::IncidentManagement::OncallSchedule, object.oncall_schedule_id).find
......
...@@ -14,15 +14,15 @@ module Types ...@@ -14,15 +14,15 @@ module Types
field :user, Types::UserType, field :user, Types::UserType,
null: false, null: false,
description: 'The user who is participating.' description: 'User who is participating.'
field :color_palette, GraphQL::Types::String, field :color_palette, GraphQL::Types::String,
null: true, null: true,
description: 'The color palette to assign to the on-call user. For example "blue".' description: 'Color palette to assign to the on-call user. For example "blue".'
field :color_weight, GraphQL::Types::String, field :color_weight, GraphQL::Types::String,
null: true, null: true,
description: 'The color weight to assign to for the on-call user, for example "500". Max 4 chars. For easy identification of the user.' description: 'Color weight to assign to for the on-call user, for example "500". Max 4 chars. For easy identification of the user.'
end end
# rubocop: enable Graphql/AuthorizeTypes # rubocop: enable Graphql/AuthorizeTypes
end end
......
...@@ -9,11 +9,11 @@ module Types ...@@ -9,11 +9,11 @@ module Types
argument :start_time, GraphQL::Types::String, argument :start_time, GraphQL::Types::String,
required: true, required: true,
description: 'The start of the rotation active period in 24 hour format, for example "18:30".' description: 'Start of the rotation active period in 24 hour format. For example, "18:30".'
argument :end_time, GraphQL::Types::String, argument :end_time, GraphQL::Types::String,
required: true, required: true,
description: 'The end of the rotation active period in 24 hour format, for example "18:30".' description: 'End of the rotation active period in 24 hour format. For example, "18:30".'
end end
# rubocop: enable Graphql/AuthorizeTypes # rubocop: enable Graphql/AuthorizeTypes
end end
......
...@@ -9,11 +9,11 @@ module Types ...@@ -9,11 +9,11 @@ module Types
field :start_time, GraphQL::Types::String, field :start_time, GraphQL::Types::String,
null: true, null: true,
description: 'The start of the rotation active period.' description: 'Start of the rotation active period.'
field :end_time, GraphQL::Types::String, field :end_time, GraphQL::Types::String,
null: true, null: true,
description: 'The end of the rotation active period.' description: 'End of the rotation active period.'
alias_method :active_period, :object alias_method :active_period, :object
......
...@@ -8,11 +8,11 @@ module Types ...@@ -8,11 +8,11 @@ module Types
argument :date, GraphQL::Types::String, argument :date, GraphQL::Types::String,
required: true, required: true,
description: 'The date component of the date in YYYY-MM-DD format.' description: 'Date component of the date in YYYY-MM-DD format.'
argument :time, GraphQL::Types::String, argument :time, GraphQL::Types::String,
required: true, required: true,
description: 'The time component of the date in 24hr HH:MM format.' description: 'Time component of the date in 24hr HH:MM format.'
DATE_FORMAT = %r[^\d{4}-[0123]\d-\d{2}$].freeze DATE_FORMAT = %r[^\d{4}-[0123]\d-\d{2}$].freeze
TIME_FORMAT = %r[^(0\d|1\d|2[0-3]):[0-5]\d$].freeze TIME_FORMAT = %r[^(0\d|1\d|2[0-3]):[0-5]\d$].freeze
......
...@@ -8,11 +8,11 @@ module Types ...@@ -8,11 +8,11 @@ module Types
argument :length, GraphQL::Types::Int, argument :length, GraphQL::Types::Int,
required: true, required: true,
description: 'The rotation length of the on-call rotation.' description: 'Rotation length of the on-call rotation.'
argument :unit, Types::IncidentManagement::OncallRotationLengthUnitEnum, argument :unit, Types::IncidentManagement::OncallRotationLengthUnitEnum,
required: true, required: true,
description: 'The unit of the rotation length of the on-call rotation.' description: 'Unit of the rotation length of the on-call rotation.'
end end
end end
end end
...@@ -8,15 +8,15 @@ module Types ...@@ -8,15 +8,15 @@ module Types
argument :username, GraphQL::Types::String, argument :username, GraphQL::Types::String,
required: true, required: true,
description: 'The username of the user to participate in the on-call rotation, such as `user_one`.' description: 'Username of the user to participate in the on-call rotation. For example, `"user_one"`.'
argument :color_palette, ::Types::DataVisualizationPalette::ColorEnum, argument :color_palette, ::Types::DataVisualizationPalette::ColorEnum,
required: false, required: false,
description: 'A value of DataVisualizationColorEnum. The color from the palette to assign to the on-call user.' description: 'Value of DataVisualizationColorEnum. The color from the palette to assign to the on-call user.'
argument :color_weight, ::Types::DataVisualizationPalette::WeightEnum, argument :color_weight, ::Types::DataVisualizationPalette::WeightEnum,
required: false, required: false,
description: 'A value of DataVisualizationWeightEnum. The color weight to assign to for the on-call user. Note: To view on-call schedules in GitLab, do not provide a value below 500. A value between 500 and 950 ensures sufficient contrast.' description: 'Color weight to assign to for the on-call user. To view on-call schedules in GitLab, do not provide a value below 500. A value between 500 and 950 ensures sufficient contrast.'
end end
end end
end end
...@@ -5,7 +5,7 @@ module Types ...@@ -5,7 +5,7 @@ module Types
graphql_name 'MoveType' graphql_name 'MoveType'
description 'The position to which the adjacent object should be moved' description 'The position to which the adjacent object should be moved'
value 'before', 'The adjacent object will be moved before the object that is being moved.' value 'before', 'Adjacent object is moved before the object that is being moved.'
value 'after', 'The adjacent object will be moved after the object that is being moved.' value 'after', 'Adjacent object is moved after the object that is being moved.'
end end
end end
...@@ -5,7 +5,7 @@ module Types ...@@ -5,7 +5,7 @@ module Types
graphql_name 'NetworkPolicyKind' graphql_name 'NetworkPolicyKind'
description 'Kind of the network policy' description 'Kind of the network policy'
value Gitlab::Kubernetes::CiliumNetworkPolicy::KIND, 'The policy kind of Cilium Network Policy.' value Gitlab::Kubernetes::CiliumNetworkPolicy::KIND, 'Policy kind of Cilium Network Policy.'
value Gitlab::Kubernetes::NetworkPolicy::KIND, 'The policy kind of Network Policy.' value Gitlab::Kubernetes::NetworkPolicy::KIND, 'Policy kind of Network Policy.'
end end
end end
...@@ -8,9 +8,9 @@ module Types ...@@ -8,9 +8,9 @@ module Types
description: 'ID of the path lock.' description: 'ID of the path lock.'
field :path, GraphQL::Types::String, null: true, field :path, GraphQL::Types::String, null: true,
description: 'The locked path.' description: 'Locked path.'
field :user, ::Types::UserType, null: true, field :user, ::Types::UserType, null: true,
description: 'The user that has locked this path.' description: 'User that has locked this path.'
end end
end end
...@@ -57,7 +57,7 @@ module Types ...@@ -57,7 +57,7 @@ module Types
field :project, field :project,
type: ::Types::ProjectType, type: ::Types::ProjectType,
null: true, null: true,
description: 'The project on which the vulnerability finding was found.' description: 'Project on which the vulnerability finding was found.'
field :description, field :description,
type: GraphQL::Types::String, type: GraphQL::Types::String,
...@@ -80,7 +80,7 @@ module Types ...@@ -80,7 +80,7 @@ module Types
field :state, field :state,
type: VulnerabilityStateEnum, type: VulnerabilityStateEnum,
null: true, null: true,
description: "The finding status." description: "Finding status."
def location def location
object.location&.merge(report_type: object.report_type) object.location&.merge(report_type: object.report_type)
......
...@@ -6,7 +6,7 @@ module Types ...@@ -6,7 +6,7 @@ module Types
graphql_name 'ScannedResource' graphql_name 'ScannedResource'
description 'Represents a resource scanned by a security scan' description 'Represents a resource scanned by a security scan'
field :url, GraphQL::Types::String, null: true, description: 'The URL scanned by the scanner.' field :url, GraphQL::Types::String, null: true, description: 'URL scanned by the scanner.'
field :request_method, GraphQL::Types::String, null: true, description: 'The HTTP request method used to access the URL.' field :request_method, GraphQL::Types::String, null: true, description: 'HTTP request method used to access the URL.'
end end
end end
...@@ -8,7 +8,7 @@ module Types ...@@ -8,7 +8,7 @@ module Types
field :vulnerabilities_count, GraphQL::Types::Int, null: true, description: 'Total number of vulnerabilities.' field :vulnerabilities_count, GraphQL::Types::Int, null: true, description: 'Total number of vulnerabilities.'
field :scanned_resources_count, GraphQL::Types::Int, null: true, description: 'Total number of scanned resources.' field :scanned_resources_count, GraphQL::Types::Int, null: true, description: 'Total number of scanned resources.'
field :scanned_resources, ::Types::ScannedResourceType.connection_type, null: true, description: 'A list of the first 20 scanned resources.' field :scanned_resources, ::Types::ScannedResourceType.connection_type, null: true, description: 'List of the first 20 scanned resources.'
field :scanned_resources_csv_path, GraphQL::Types::String, null: true, description: 'Path to download all the scanned resources in CSV format.' field :scanned_resources_csv_path, GraphQL::Types::String, null: true, description: 'Path to download all the scanned resources in CSV format.'
field :scans, ::Types::ScanType.connection_type, null: false, description: 'List of security scans ran for the type.' field :scans, ::Types::ScanType.connection_type, null: false, description: 'List of security scans ran for the type.'
end end
......
...@@ -7,9 +7,9 @@ module Types ...@@ -7,9 +7,9 @@ module Types
description 'Represents measured stats metrics for timeboxes' description 'Represents measured stats metrics for timeboxes'
field :count, GraphQL::Types::Int, null: false, field :count, GraphQL::Types::Int, null: false,
description: 'The count metric.' description: 'Count metric.'
field :weight, GraphQL::Types::Int, null: false, field :weight, GraphQL::Types::Int, null: false,
description: 'The weight metric.' description: 'Weight metric.'
end end
end end
...@@ -15,7 +15,7 @@ module Types ...@@ -15,7 +15,7 @@ module Types
description: "Type of the issue link." description: "Type of the issue link."
field :issue, ::Types::IssueType, null: false, field :issue, ::Types::IssueType, null: false,
description: 'The issue attached to issue link.' description: 'Issue attached to issue link.'
end end
end end
end end
...@@ -8,7 +8,7 @@ module Types ...@@ -8,7 +8,7 @@ module Types
description 'Represents the vulnerability details commit field' description 'Represents the vulnerability details commit field'
field :value, GraphQL::Types::String, null: false, field :value, GraphQL::Types::String, null: false,
description: 'The commit SHA value.' description: 'Commit SHA value.'
end end
end end
end end
...@@ -58,7 +58,7 @@ module Types ...@@ -58,7 +58,7 @@ module Types
description: 'Identifiers of the vulnerability.' description: 'Identifiers of the vulnerability.'
field :project, ::Types::ProjectType, null: true, field :project, ::Types::ProjectType, null: true,
description: 'The project on which the vulnerability was found.', description: 'Project on which the vulnerability was found.',
authorize: :read_project authorize: :read_project
field :detected_at, Types::TimeType, null: false, field :detected_at, Types::TimeType, null: false,
...@@ -82,13 +82,13 @@ module Types ...@@ -82,13 +82,13 @@ module Types
description: 'Merge request that fixes the vulnerability.' description: 'Merge request that fixes the vulnerability.'
field :confirmed_by, ::Types::UserType, null: true, field :confirmed_by, ::Types::UserType, null: true,
description: 'The user that confirmed the vulnerability.' description: 'User that confirmed the vulnerability.'
field :resolved_by, ::Types::UserType, null: true, field :resolved_by, ::Types::UserType, null: true,
description: 'The user that resolved the vulnerability.' description: 'User that resolved the vulnerability.'
field :dismissed_by, ::Types::UserType, null: true, field :dismissed_by, ::Types::UserType, null: true,
description: 'The user that dismissed the vulnerability.' description: 'User that dismissed the vulnerability.'
field :details, [VulnerabilityDetailType], null: false, field :details, [VulnerabilityDetailType], null: false,
description: 'Details of the vulnerability.', description: 'Details of the vulnerability.',
......
...@@ -7,9 +7,9 @@ module Types ...@@ -7,9 +7,9 @@ module Types
description 'Represents a vulnerable dependency. Used in vulnerability location data' description 'Represents a vulnerable dependency. Used in vulnerability location data'
field :package, ::Types::VulnerablePackageType, null: true, field :package, ::Types::VulnerablePackageType, null: true,
description: 'The package associated with the vulnerable dependency.' description: 'Package associated with the vulnerable dependency.'
field :version, GraphQL::Types::String, null: true, field :version, GraphQL::Types::String, null: true,
description: 'The version of the vulnerable dependency.' description: 'Version of the vulnerable dependency.'
end end
end end
...@@ -7,6 +7,6 @@ module Types ...@@ -7,6 +7,6 @@ module Types
description 'Represents a vulnerable package. Used in vulnerability dependency data' description 'Represents a vulnerable package. Used in vulnerability dependency data'
field :name, GraphQL::Types::String, null: true, field :name, GraphQL::Types::String, null: true,
description: 'The name of the vulnerable package.' description: 'Name of the vulnerable package.'
end end
end end
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