Commit c8a5ead0 authored by Matthias Käppler's avatar Matthias Käppler

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

Fix Rubocop Graphql/Description offenses

See merge request gitlab-org/gitlab!69413
parents f9aa91c8 fc9567f3
......@@ -23,39 +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'
- 'ee/app/graphql/mutations/epic_tree/reorder.rb'
- 'ee/app/graphql/mutations/epics/add_issue.rb'
- 'ee/app/graphql/mutations/epics/base.rb'
- 'ee/app/graphql/mutations/epics/create.rb'
- 'ee/app/graphql/mutations/epics/set_subscription.rb'
- 'ee/app/graphql/mutations/gitlab_subscriptions/activate.rb'
- 'ee/app/graphql/mutations/incident_management/escalation_policy/base.rb'
- 'ee/app/graphql/mutations/incident_management/escalation_policy/create.rb'
- 'ee/app/graphql/mutations/incident_management/escalation_policy/destroy.rb'
- 'ee/app/graphql/mutations/incident_management/escalation_policy/update.rb'
- 'ee/app/graphql/mutations/incident_management/oncall_rotation/base.rb'
- 'ee/app/graphql/mutations/incident_management/oncall_rotation/create.rb'
- 'ee/app/graphql/mutations/incident_management/oncall_rotation/destroy.rb'
- 'ee/app/graphql/mutations/incident_management/oncall_rotation/update.rb'
- 'ee/app/graphql/mutations/incident_management/oncall_schedule/create.rb'
- 'ee/app/graphql/mutations/incident_management/oncall_schedule/destroy.rb'
- 'ee/app/graphql/mutations/incident_management/oncall_schedule/oncall_schedule_base.rb'
- 'ee/app/graphql/mutations/incident_management/oncall_schedule/update.rb'
- 'ee/app/graphql/mutations/issues/common_ee_mutation_arguments.rb'
- 'ee/app/graphql/mutations/issues/promote_to_epic.rb'
- 'ee/app/graphql/mutations/issues/set_iteration.rb'
- 'ee/app/graphql/mutations/iterations/cadences/create.rb'
- 'ee/app/graphql/mutations/iterations/cadences/update.rb'
- 'ee/app/graphql/mutations/iterations/create.rb'
- 'ee/app/graphql/mutations/namespaces/base.rb'
- 'ee/app/graphql/mutations/quality_management/test_cases/create.rb'
- 'ee/app/graphql/mutations/requirements_management/update_requirement.rb'
- 'ee/app/graphql/mutations/vulnerabilities/confirm.rb'
- 'ee/app/graphql/mutations/vulnerabilities/create_external_issue_link.rb'
- 'ee/app/graphql/mutations/vulnerabilities/destroy_external_issue_link.rb'
- 'ee/app/graphql/mutations/vulnerabilities/dismiss.rb'
- 'ee/app/graphql/mutations/vulnerabilities/resolve.rb'
- 'ee/app/graphql/mutations/vulnerabilities/revert_to_detected.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'
......
This diff is collapsed.
......@@ -10,7 +10,7 @@ module Mutations
argument :base_epic_id,
::Types::GlobalIDType[::Epic],
required: true,
description: 'The ID of the base epic of the tree.'
description: 'ID of the base epic of the tree.'
argument :moved,
Types::EpicTree::EpicTreeNodeInputType,
......
......@@ -11,16 +11,16 @@ module Mutations
argument :project_path, GraphQL::Types::ID,
required: true,
description: 'The full path of the project the issue belongs to.'
description: 'Full path of the project the issue belongs to.'
argument :issue_iid, GraphQL::Types::String,
required: true,
description: 'The IID of the issue to be added.'
description: 'IID of the issue to be added.'
field :epic_issue,
Types::EpicIssueType,
null: true,
description: 'The epic-issue relation.'
description: 'Epic-issue relationship.'
def resolve(group_path:, iid:, project_path:, issue_iid:)
epic = authorized_find!(group_path: group_path, iid: iid)
......
......@@ -7,16 +7,16 @@ module Mutations
argument :iid, GraphQL::Types::ID,
required: true,
description: "The IID of the epic to mutate."
description: "IID of the epic to mutate."
argument :group_path, GraphQL::Types::ID,
required: true,
description: 'The group the epic to mutate belongs to.'
description: 'Group the epic to mutate belongs to.'
field :epic,
Types::EpicType,
null: true,
description: 'The epic after mutation.'
description: 'Epic after mutation.'
private
......
......@@ -13,7 +13,7 @@ module Mutations
field :epic,
Types::EpicType,
null: true,
description: 'The created epic.'
description: 'Created epic.'
def resolve(args)
group_path = args.delete(:group_path)
......
......@@ -9,7 +9,7 @@ module Mutations
argument :subscribed_state, GraphQL::Types::Boolean,
required: true,
description: 'The desired state of the subscription.'
description: 'Desired state of the subscription.'
def resolve(args)
group_path = args.delete(:group_path)
......
......@@ -13,7 +13,7 @@ module Mutations
field :license, Types::Admin::CloudLicenses::CurrentLicenseType,
null: true,
description: 'The current license.'
description: 'Current license.'
def resolve(activation_code:)
authorize! :global
......
......@@ -7,7 +7,7 @@ module Mutations
field :escalation_policy,
::Types::IncidentManagement::EscalationPolicyType,
null: true,
description: 'The escalation policy.'
description: 'Escalation policy.'
authorize :admin_incident_management_escalation_policy
......
......@@ -10,19 +10,19 @@ module Mutations
argument :project_path, GraphQL::Types::ID,
required: true,
description: 'The project to create the escalation policy for.'
description: 'Project to create the escalation policy for.'
argument :name, GraphQL::Types::String,
required: true,
description: 'The name of the escalation policy.'
description: 'Name of the escalation policy.'
argument :description, GraphQL::Types::String,
required: false,
description: 'The description of the escalation policy.'
description: 'Description of the escalation policy.'
argument :rules, [Types::IncidentManagement::EscalationRuleInputType],
required: true,
description: 'The steps of the escalation policy.'
description: 'Steps of the escalation policy.'
def resolve(project_path:, **args)
project = authorized_find!(project_path: project_path, **args)
......
......@@ -8,7 +8,7 @@ module Mutations
argument :id, Types::GlobalIDType[::IncidentManagement::EscalationPolicy],
required: true,
description: 'The escalation policy internal ID to remove.'
description: 'Escalation policy internal ID to remove.'
def resolve(id:)
escalation_policy = authorized_find!(id: id)
......
......@@ -8,19 +8,19 @@ module Mutations
argument :id, ::Types::GlobalIDType[::IncidentManagement::EscalationPolicy],
required: true,
description: 'The ID of the on-call schedule to create the on-call rotation in.'
description: 'ID of the on-call schedule to create the on-call rotation in.'
argument :name, GraphQL::Types::String,
required: false,
description: 'The name of the escalation policy.'
description: 'Name of the escalation policy.'
argument :description, GraphQL::Types::String,
required: false,
description: 'The description of the escalation policy.'
description: 'Description of the escalation policy.'
argument :rules, [Types::IncidentManagement::EscalationRuleInputType],
required: false,
description: 'The steps of the escalation policy.'
description: 'Steps of the escalation policy.'
def resolve(id:, **args)
policy = authorized_find!(id: id)
......
......@@ -10,7 +10,7 @@ module Mutations
field :oncall_rotation,
::Types::IncidentManagement::OncallRotationType,
null: true,
description: 'The on-call rotation.'
description: 'On-call rotation.'
authorize :admin_incident_management_oncall_schedule
......
......@@ -10,37 +10,37 @@ module Mutations
argument :project_path, GraphQL::Types::ID,
required: true,
description: 'The project to create the on-call schedule in.'
description: 'Project to create the on-call schedule in.'
argument :schedule_iid, GraphQL::Types::String,
required: true,
description: 'The IID of the on-call schedule to create the on-call rotation in.',
description: 'IID of the on-call schedule to create the on-call rotation in.',
as: :iid
argument :name, GraphQL::Types::String,
required: true,
description: 'The name of the on-call rotation.'
description: 'Name of the on-call rotation.'
argument :starts_at, Types::IncidentManagement::OncallRotationDateInputType,
required: true,
description: 'The start date and time of the on-call rotation, in the timezone of the on-call schedule.'
description: 'Start date and time of the on-call rotation, in the timezone of the on-call schedule.'
argument :ends_at, Types::IncidentManagement::OncallRotationDateInputType,
required: false,
description: 'The end date and time of the on-call rotation, in the timezone of the on-call schedule.'
description: 'End date and time of the on-call rotation, in the timezone of the on-call schedule.'
argument :rotation_length, Types::IncidentManagement::OncallRotationLengthInputType,
required: true,
description: 'The rotation length of the on-call rotation.'
description: 'Rotation length of the on-call rotation.'
argument :active_period, Types::IncidentManagement::OncallRotationActivePeriodInputType,
required: false,
description: 'The active period of time that the on-call rotation should take place.'
description: 'Active period of time that the on-call rotation should take place.'
argument :participants,
[Types::IncidentManagement::OncallUserInputType],
required: true,
description: 'The usernames of users participating in the on-call rotation. A maximum limit of 100 participants applies.'
description: 'Usernames of users participating in the on-call rotation. A maximum limit of 100 participants applies.'
def resolve(iid:, project_path:, participants:, **args)
project = Project.find_by_full_path(project_path)
......
......@@ -8,15 +8,15 @@ module Mutations
argument :project_path, GraphQL::Types::ID,
required: true,
description: 'The project to remove the on-call schedule from.'
description: 'Project to remove the on-call schedule from.'
argument :schedule_iid, GraphQL::Types::String,
required: true,
description: 'The IID of the on-call schedule to the on-call rotation belongs to.'
description: 'IID of the on-call schedule to the on-call rotation belongs to.'
argument :id, Types::GlobalIDType[::IncidentManagement::OncallRotation],
required: true,
description: 'The ID of the on-call rotation to remove.'
description: 'ID of the on-call rotation to remove.'
def resolve(project_path:, schedule_iid:, id:)
oncall_rotation = authorized_find!(project_path: project_path, schedule_iid: schedule_iid, id: id)
......
......@@ -10,32 +10,32 @@ module Mutations
argument :id, ::Types::GlobalIDType[::IncidentManagement::OncallRotation],
required: true,
description: 'The ID of the on-call schedule to create the on-call rotation in.'
description: 'ID of the on-call schedule to create the on-call rotation in.'
argument :name, GraphQL::Types::String,
required: false,
description: 'The name of the on-call rotation.'
description: 'Name of the on-call rotation.'
argument :starts_at, Types::IncidentManagement::OncallRotationDateInputType,
required: false,
description: 'The start date and time of the on-call rotation, in the timezone of the on-call schedule.'
description: 'Start date and time of the on-call rotation, in the timezone of the on-call schedule.'
argument :ends_at, Types::IncidentManagement::OncallRotationDateInputType,
required: false,
description: 'The end date and time of the on-call rotation, in the timezone of the on-call schedule.'
description: 'End date and time of the on-call rotation, in the timezone of the on-call schedule.'
argument :rotation_length, Types::IncidentManagement::OncallRotationLengthInputType,
required: false,
description: 'The rotation length of the on-call rotation.'
description: 'Rotation length of the on-call rotation.'
argument :active_period, Types::IncidentManagement::OncallRotationActivePeriodInputType,
required: false,
description: 'The active period of time that the on-call rotation should take place.'
description: 'Active period of time that the on-call rotation should take place.'
argument :participants,
[Types::IncidentManagement::OncallUserInputType],
required: false,
description: 'The usernames of users participating in the on-call rotation. A maximum limit of 100 participants applies.'
description: 'Usernames of users participating in the on-call rotation. A maximum limit of 100 participants applies.'
def resolve(id:, **args)
rotation = authorized_find!(id: id)
......
......@@ -10,19 +10,19 @@ module Mutations
argument :project_path, GraphQL::Types::ID,
required: true,
description: 'The project to create the on-call schedule in.'
description: 'Project to create the on-call schedule in.'
argument :name, GraphQL::Types::String,
required: true,
description: 'The name of the on-call schedule.'
description: 'Name of the on-call schedule.'
argument :description, GraphQL::Types::String,
required: false,
description: 'The description of the on-call schedule.'
description: 'Description of the on-call schedule.'
argument :timezone, GraphQL::Types::String,
required: true,
description: 'The timezone of the on-call schedule.'
description: 'Timezone of the on-call schedule.'
def resolve(args)
project = authorized_find!(args[:project_path])
......
......@@ -8,11 +8,11 @@ module Mutations
argument :project_path, GraphQL::Types::ID,
required: true,
description: 'The project to remove the on-call schedule from.'
description: 'Project to remove the on-call schedule from.'
argument :iid, GraphQL::Types::String,
required: true,
description: 'The on-call schedule internal ID to remove.'
description: 'On-call schedule internal ID to remove.'
def resolve(project_path:, iid:)
oncall_schedule = authorized_find!(project_path: project_path, iid: iid)
......
......@@ -7,7 +7,7 @@ module Mutations
field :oncall_schedule,
::Types::IncidentManagement::OncallScheduleType,
null: true,
description: 'The on-call schedule.'
description: 'On-call schedule.'
authorize :admin_incident_management_oncall_schedule
......
......@@ -8,23 +8,23 @@ module Mutations
argument :project_path, GraphQL::Types::ID,
required: true,
description: 'The project to update the on-call schedule in.'
description: 'Project to update the on-call schedule in.'
argument :iid, GraphQL::Types::String,
required: true,
description: 'The on-call schedule internal ID to update.'
description: 'On-call schedule internal ID to update.'
argument :name, GraphQL::Types::String,
required: false,
description: 'The name of the on-call schedule.'
description: 'Name of the on-call schedule.'
argument :description, GraphQL::Types::String,
required: false,
description: 'The description of the on-call schedule.'
description: 'Description of the on-call schedule.'
argument :timezone, GraphQL::Types::String,
required: false,
description: 'The timezone of the on-call schedule.'
description: 'Timezone of the on-call schedule.'
def resolve(args)
oncall_schedule = authorized_find!(project_path: args[:project_path], iid: args[:iid])
......
......@@ -9,11 +9,11 @@ module Mutations
argument :health_status,
::Types::HealthStatusEnum,
required: false,
description: 'The desired health status.'
description: 'Desired health status.'
argument :weight, GraphQL::Types::Int,
required: false,
description: 'The weight of the issue.'
description: 'Weight of the issue.'
end
end
end
......
......@@ -9,12 +9,12 @@ module Mutations
argument :group_path, GraphQL::Types::ID,
required: false,
description: 'The group the promoted epic will belong to.'
description: 'Group the promoted epic will belong to.'
field :epic,
Types::EpicType,
null: true,
description: "The epic after issue promotion."
description: "Epic after issue promotion."
def resolve(project_path:, iid:, group_path: nil)
errors = []
......
......@@ -10,7 +10,7 @@ module Mutations
required: false,
loads: Types::IterationType,
description: <<~DESC
The iteration to assign to the issue.
Iteration to assign to the issue.
DESC
def resolve(project_path:, iid:, iteration: nil)
......
......@@ -11,7 +11,7 @@ module Mutations
authorize :create_iteration_cadence
argument :group_path, GraphQL::Types::ID, required: true,
description: "The group where the iteration cadence is created."
description: "Group where the iteration cadence is created."
argument :title, GraphQL::Types::String, required: false,
description: copy_field_description(Types::Iterations::CadenceType, :title)
......@@ -38,7 +38,7 @@ module Mutations
description: copy_field_description(Types::Iterations::CadenceType, :description)
field :iteration_cadence, Types::Iterations::CadenceType, null: true,
description: 'The created iteration cadence.'
description: 'Created iteration cadence.'
def resolve(args)
group = authorized_find!(group_path: args.delete(:group_path))
......
......@@ -36,7 +36,7 @@ module Mutations
description: copy_field_description(Types::Iterations::CadenceType, :description)
field :iteration_cadence, Types::Iterations::CadenceType, null: true,
description: 'The updated iteration cadence.'
description: 'Updated iteration cadence.'
def resolve(id:, **attrs)
iteration_cadence = authorized_find!(id: id)
......
......@@ -12,7 +12,7 @@ module Mutations
field :iteration,
Types::IterationType,
null: true,
description: 'The created iteration.'
description: 'Created iteration.'
argument :iterations_cadence_id,
::Types::GlobalIDType[::Iterations::Cadence],
......@@ -23,22 +23,22 @@ module Mutations
argument :title,
GraphQL::Types::String,
required: false,
description: 'The title of the iteration.'
description: 'Title of the iteration.'
argument :description,
GraphQL::Types::String,
required: false,
description: 'The description of the iteration.'
description: 'Description of the iteration.'
argument :start_date,
GraphQL::Types::String,
required: false,
description: 'The start date of the iteration.'
description: 'Start date of the iteration.'
argument :due_date,
GraphQL::Types::String,
required: false,
description: 'The end date of the iteration.'
description: 'End date of the iteration.'
def resolve(args)
parent = authorized_resource_parent_find!(args)
......
......@@ -5,12 +5,12 @@ module Mutations
class Base < ::Mutations::BaseMutation
argument :id, ::Types::GlobalIDType[::Namespace],
required: true,
description: 'The global ID of the namespace to mutate.'
description: 'Global ID of the namespace to mutate.'
field :namespace,
Types::NamespaceType,
null: true,
description: 'The namespace after mutation.'
description: 'Namespace after mutation.'
private
......
......@@ -12,24 +12,24 @@ module Mutations
argument :title, GraphQL::Types::String,
required: true,
description: 'The test case title.'
description: 'Test case title.'
argument :description, GraphQL::Types::String,
required: false,
description: 'The test case description.'
description: 'Test case description.'
argument :label_ids,
[GraphQL::Types::ID],
required: false,
description: 'The IDs of labels to be added to the test case.'
description: 'IDs of labels to be added to the test case.'
argument :project_path, GraphQL::Types::ID,
required: true,
description: 'The project full path to create the test case.'
description: 'Project full path to create the test case in.'
field :test_case, Types::IssueType,
null: true,
description: 'The test case created.'
description: 'Test case created.'
def resolve(args)
project_path = args.delete(:project_path)
......
......@@ -13,7 +13,7 @@ module Mutations
argument :iid, GraphQL::Types::String,
required: true,
description: 'The IID of the requirement to update.'
description: 'IID of the requirement to update.'
argument :last_test_report_state, Types::RequirementsManagement::TestReportStateEnum,
required: false,
......
......@@ -9,7 +9,7 @@ module Mutations
field :vulnerability, Types::VulnerabilityType,
null: true,
description: 'The vulnerability after state change.'
description: 'Vulnerability after state change.'
argument :id,
::Types::GlobalIDType[::Vulnerability],
......
......@@ -9,7 +9,7 @@ module Mutations
field :external_issue_link, Types::Vulnerability::ExternalIssueLinkType,
null: true,
description: 'The created external issue link.'
description: 'Created external issue link.'
argument :id,
::Types::GlobalIDType[::Vulnerability],
......
......@@ -11,7 +11,7 @@ module Mutations
argument :id, ::Types::GlobalIDType[::Vulnerabilities::ExternalIssueLink],
required: true,
description: 'The global ID of the vulnerability external issue link.'
description: 'Global ID of the vulnerability external issue link.'
def resolve(id:)
vulnerability_external_issue_link = authorized_find!(id: id)
......
......@@ -9,7 +9,7 @@ module Mutations
field :vulnerability, Types::VulnerabilityType,
null: true,
description: 'The vulnerability after dismissal.'
description: 'Vulnerability after dismissal.'
argument :id,
::Types::GlobalIDType[::Vulnerability],
......
......@@ -9,7 +9,7 @@ module Mutations
field :vulnerability, Types::VulnerabilityType,
null: true,
description: 'The vulnerability after state change.'
description: 'Vulnerability after state change.'
argument :id,
::Types::GlobalIDType[::Vulnerability],
......
......@@ -9,7 +9,7 @@ module Mutations
field :vulnerability, Types::VulnerabilityType,
null: true,
description: 'The vulnerability after revert.'
description: 'Vulnerability after revert.'
argument :id,
::Types::GlobalIDType[::Vulnerability],
......
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