Commit c64366eb authored by Luke Duncalfe's avatar Luke Duncalfe

Fix Graphql/Descriptions EE mutation offenses

https://gitlab.com/gitlab-org/gitlab/-/merge_requests/46721 introduced a
new rubocop that enforced periods at the end of GraphQL description
strings. Existing offenses were added to `.rubocop_manual_todo.yml`.

This change fixes offenses in `ee/app/graphql/mutations` and
`ee/app/graphql/ee/mutations` and removes their exclusion of them from
`.rubocop_manual_todo.yml`.

The changes were generated using the following autocorrect:

    bundle exec rubocop ee/app/graphql \
      --auto-correct \
      --only Graphql/Descriptions

https://gitlab.com/gitlab-org/gitlab/-/issues/292426
parent 8744311a
...@@ -881,10 +881,6 @@ Graphql/Descriptions: ...@@ -881,10 +881,6 @@ Graphql/Descriptions:
- 'app/graphql/types/tree/tree_type.rb' - 'app/graphql/types/tree/tree_type.rb'
- 'app/graphql/types/user_status_type.rb' - 'app/graphql/types/user_status_type.rb'
- 'app/graphql/types/user_type.rb' - 'app/graphql/types/user_type.rb'
- 'ee/app/graphql/ee/mutations/boards/issues/issue_move_list.rb'
- 'ee/app/graphql/ee/mutations/boards/lists/create.rb'
- 'ee/app/graphql/ee/mutations/issues/create.rb'
- 'ee/app/graphql/ee/mutations/issues/update.rb'
- 'ee/app/graphql/ee/resolvers/issues_resolver.rb' - 'ee/app/graphql/ee/resolvers/issues_resolver.rb'
- 'ee/app/graphql/ee/resolvers/namespace_projects_resolver.rb' - 'ee/app/graphql/ee/resolvers/namespace_projects_resolver.rb'
- 'ee/app/graphql/ee/types/board_list_type.rb' - 'ee/app/graphql/ee/types/board_list_type.rb'
...@@ -898,44 +894,6 @@ Graphql/Descriptions: ...@@ -898,44 +894,6 @@ Graphql/Descriptions:
- 'ee/app/graphql/ee/types/namespace_type.rb' - 'ee/app/graphql/ee/types/namespace_type.rb'
- 'ee/app/graphql/ee/types/project_type.rb' - 'ee/app/graphql/ee/types/project_type.rb'
- 'ee/app/graphql/ee/types/query_type.rb' - 'ee/app/graphql/ee/types/query_type.rb'
- 'ee/app/graphql/mutations/admin/analytics/devops_adoption/segments/delete.rb'
- 'ee/app/graphql/mutations/admin/analytics/devops_adoption/segments/mixins.rb'
- 'ee/app/graphql/mutations/admin/analytics/devops_adoption/segments/update.rb'
- 'ee/app/graphql/mutations/boards/lists/update_limit_metrics.rb'
- 'ee/app/graphql/mutations/boards/update.rb'
- 'ee/app/graphql/mutations/boards/update_epic_user_preferences.rb'
- 'ee/app/graphql/mutations/compliance_management/frameworks/destroy.rb'
- 'ee/app/graphql/mutations/compliance_management/frameworks/update.rb'
- 'ee/app/graphql/mutations/clusters/agent_tokens/create.rb'
- 'ee/app/graphql/mutations/clusters/agent_tokens/delete.rb'
- 'ee/app/graphql/mutations/clusters/agents/create.rb'
- 'ee/app/graphql/mutations/clusters/agents/delete.rb'
- 'ee/app/graphql/mutations/concerns/mutations/shared_epic_arguments.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/epics/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/instance_security_dashboard/add_project.rb'
- 'ee/app/graphql/mutations/instance_security_dashboard/remove_project.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_weight.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/base_requirement.rb'
- 'ee/app/graphql/mutations/requirements_management/update_requirement.rb'
- 'ee/app/graphql/mutations/security/ci_configuration/configure_sast.rb'
- 'ee/app/graphql/mutations/vulnerabilities/confirm.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/board_groupings/epics_resolver.rb' - 'ee/app/graphql/resolvers/board_groupings/epics_resolver.rb'
- 'ee/app/graphql/resolvers/boards/epic_boards_resolver.rb' - 'ee/app/graphql/resolvers/boards/epic_boards_resolver.rb'
- 'ee/app/graphql/resolvers/ci/code_coverage_activities_resolver.rb' - 'ee/app/graphql/resolvers/ci/code_coverage_activities_resolver.rb'
......
This diff is collapsed.
...@@ -13,7 +13,7 @@ module EE ...@@ -13,7 +13,7 @@ module EE
prepended do prepended do
argument :epic_id, EpicID, argument :epic_id, EpicID,
required: false, required: false,
description: 'The ID of the parent epic. NULL when removing the association' description: 'The ID of the parent epic. NULL when removing the association.'
end end
override :move_issue override :move_issue
......
...@@ -11,13 +11,13 @@ module EE ...@@ -11,13 +11,13 @@ module EE
prepended do prepended do
argument :milestone_id, ::Types::GlobalIDType[::Milestone], argument :milestone_id, ::Types::GlobalIDType[::Milestone],
required: false, required: false,
description: 'Global ID of an existing milestone' description: 'Global ID of an existing milestone.'
argument :iteration_id, ::Types::GlobalIDType[::Iteration], argument :iteration_id, ::Types::GlobalIDType[::Iteration],
required: false, required: false,
description: 'Global ID of an existing iteration' description: 'Global ID of an existing iteration.'
argument :assignee_id, ::Types::GlobalIDType[::User], argument :assignee_id, ::Types::GlobalIDType[::User],
required: false, required: false,
description: 'Global ID of an existing user' description: 'Global ID of an existing user.'
end end
private private
......
...@@ -11,7 +11,7 @@ module EE ...@@ -11,7 +11,7 @@ module EE
argument :epic_id, ::Types::GlobalIDType[::Epic], argument :epic_id, ::Types::GlobalIDType[::Epic],
required: false, required: false,
description: 'The ID of an epic to associate the issue with' description: 'The ID of an epic to associate the issue with.'
end end
private private
......
...@@ -12,7 +12,7 @@ module EE ...@@ -12,7 +12,7 @@ module EE
argument :epic_id, ::Types::GlobalIDType[::Epic], argument :epic_id, ::Types::GlobalIDType[::Epic],
required: false, required: false,
loads: ::Types::EpicType, loads: ::Types::EpicType,
description: 'The ID of the parent epic. NULL when removing the association' description: 'The ID of the parent epic. NULL when removing the association.'
end end
def resolve(**args) def resolve(**args)
......
...@@ -12,7 +12,7 @@ module Mutations ...@@ -12,7 +12,7 @@ module Mutations
argument :id, ::Types::GlobalIDType[::Analytics::DevopsAdoption::Segment], argument :id, ::Types::GlobalIDType[::Analytics::DevopsAdoption::Segment],
required: true, required: true,
description: "ID of the segment" description: "ID of the segment."
def resolve(id:, **) def resolve(id:, **)
response = ::Analytics::DevopsAdoption::Segments::DeleteService response = ::Analytics::DevopsAdoption::Segments::DeleteService
......
...@@ -41,16 +41,16 @@ module Mutations ...@@ -41,16 +41,16 @@ module Mutations
included do included do
argument :name, GraphQL::STRING_TYPE, argument :name, GraphQL::STRING_TYPE,
required: true, required: true,
description: 'Name of the segment' description: 'Name of the segment.'
argument :group_ids, [::Types::GlobalIDType[::Group]], argument :group_ids, [::Types::GlobalIDType[::Group]],
required: false, required: false,
description: 'The array of group IDs to set for the segment' description: 'The array of group IDs to set for the segment.'
field :segment, field :segment,
Types::Admin::Analytics::DevopsAdoption::SegmentType, Types::Admin::Analytics::DevopsAdoption::SegmentType,
null: true, null: true,
description: 'The segment after mutation' description: 'The segment after mutation.'
end end
end end
end end
......
...@@ -13,7 +13,7 @@ module Mutations ...@@ -13,7 +13,7 @@ module Mutations
argument :id, ::Types::GlobalIDType[::Analytics::DevopsAdoption::Segment], argument :id, ::Types::GlobalIDType[::Analytics::DevopsAdoption::Segment],
required: true, required: true,
description: "ID of the segment" description: "ID of the segment."
def resolve(id:, name:, group_ids: nil, **) def resolve(id:, name:, group_ids: nil, **)
groups = GlobalID::Locator.locate_many(group_ids) if group_ids groups = GlobalID::Locator.locate_many(group_ids) if group_ids
......
...@@ -29,7 +29,7 @@ module Mutations ...@@ -29,7 +29,7 @@ module Mutations
field :list, field :list,
::Types::BoardListType, ::Types::BoardListType,
null: true, null: true,
description: 'The updated list' description: 'The updated list.'
def ready?(**args) def ready?(**args)
if limit_metric_settings_of(args).blank? if limit_metric_settings_of(args).blank?
......
...@@ -8,22 +8,22 @@ module Mutations ...@@ -8,22 +8,22 @@ module Mutations
argument :board_id, argument :board_id,
::Types::GlobalIDType[::Board], ::Types::GlobalIDType[::Board],
required: true, required: true,
description: 'The board global ID' description: 'The board global ID.'
argument :epic_id, argument :epic_id,
::Types::GlobalIDType[::Epic], ::Types::GlobalIDType[::Epic],
required: true, required: true,
description: 'ID of an epic to set preferences for' description: 'ID of an epic to set preferences for.'
argument :collapsed, argument :collapsed,
GraphQL::BOOLEAN_TYPE, GraphQL::BOOLEAN_TYPE,
required: true, required: true,
description: 'Whether the epic should be collapsed in the board' description: 'Whether the epic should be collapsed in the board.'
field :epic_user_preferences, field :epic_user_preferences,
Types::Boards::EpicUserPreferencesType, Types::Boards::EpicUserPreferencesType,
null: true, null: true,
description: 'User preferences for the epic in the board after mutation' description: 'User preferences for the epic in the board after mutation.'
authorize :read_board authorize :read_board
......
...@@ -12,17 +12,17 @@ module Mutations ...@@ -12,17 +12,17 @@ module Mutations
argument :cluster_agent_id, ClusterAgentID, argument :cluster_agent_id, ClusterAgentID,
required: true, required: true,
description: 'Global ID of the cluster agent that will be associated with the new token' description: 'Global ID of the cluster agent that will be associated with the new token.'
field :secret, field :secret,
GraphQL::STRING_TYPE, GraphQL::STRING_TYPE,
null: true, null: true,
description: "Token secret value. Make sure you save it - you won't be able to access it again" description: "Token secret value. Make sure you save it - you won't be able to access it again."
field :token, field :token,
Types::Clusters::AgentTokenType, Types::Clusters::AgentTokenType,
null: true, null: true,
description: 'Token created after mutation' description: 'Token created after mutation.'
def resolve(cluster_agent_id:) def resolve(cluster_agent_id:)
cluster_agent = authorized_find!(id: cluster_agent_id) cluster_agent = authorized_find!(id: cluster_agent_id)
......
...@@ -12,7 +12,7 @@ module Mutations ...@@ -12,7 +12,7 @@ module Mutations
argument :id, TokenID, argument :id, TokenID,
required: true, required: true,
description: 'Global ID of the cluster agent token that will be deleted' description: 'Global ID of the cluster agent token that will be deleted.'
def resolve(id:) def resolve(id:)
token = authorized_find!(id: id) token = authorized_find!(id: id)
......
...@@ -12,16 +12,16 @@ module Mutations ...@@ -12,16 +12,16 @@ module Mutations
argument :project_path, GraphQL::ID_TYPE, argument :project_path, GraphQL::ID_TYPE,
required: true, required: true,
description: 'Full path of the associated project for this cluster agent' description: 'Full path of the associated project for this cluster agent.'
argument :name, GraphQL::STRING_TYPE, argument :name, GraphQL::STRING_TYPE,
required: true, required: true,
description: 'Name of the cluster agent' description: 'Name of the cluster agent.'
field :cluster_agent, field :cluster_agent,
Types::Clusters::AgentType, Types::Clusters::AgentType,
null: true, null: true,
description: 'Cluster agent created after mutation' description: 'Cluster agent created after mutation.'
def resolve(project_path:, name:) def resolve(project_path:, name:)
project = authorized_find!(full_path: project_path) project = authorized_find!(full_path: project_path)
......
...@@ -12,7 +12,7 @@ module Mutations ...@@ -12,7 +12,7 @@ module Mutations
argument :id, AgentID, argument :id, AgentID,
required: true, required: true,
description: 'Global ID of the cluster agent that will be deleted' description: 'Global ID of the cluster agent that will be deleted.'
def resolve(id:) def resolve(id:)
cluster_agent = authorized_find!(id: id) cluster_agent = 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 destroy' description: 'The global ID of the compliance framework to destroy.'
def resolve(id:) def resolve(id:)
framework = authorized_find!(id: id) framework = authorized_find!(id: id)
......
...@@ -7,42 +7,42 @@ module Mutations ...@@ -7,42 +7,42 @@ module Mutations
prepended do prepended do
argument :group_path, GraphQL::ID_TYPE, argument :group_path, GraphQL::ID_TYPE,
required: true, required: true,
description: "The group the epic to mutate is in" description: "The group the epic to mutate is in."
argument :title, argument :title,
GraphQL::STRING_TYPE, GraphQL::STRING_TYPE,
required: false, required: false,
description: 'The title of the epic' description: 'The title of the epic.'
argument :description, argument :description,
GraphQL::STRING_TYPE, GraphQL::STRING_TYPE,
required: false, required: false,
description: 'The description of the epic' description: 'The description of the epic.'
argument :confidential, argument :confidential,
GraphQL::BOOLEAN_TYPE, GraphQL::BOOLEAN_TYPE,
required: false, required: false,
description: 'Indicates if the epic is confidential' description: 'Indicates if the epic is confidential.'
argument :start_date_fixed, argument :start_date_fixed,
GraphQL::STRING_TYPE, GraphQL::STRING_TYPE,
required: false, required: false,
description: 'The start date of the epic' description: 'The start date of the epic.'
argument :due_date_fixed, argument :due_date_fixed,
GraphQL::STRING_TYPE, GraphQL::STRING_TYPE,
required: false, required: false,
description: 'The end date of the epic' description: 'The end date of the epic.'
argument :start_date_is_fixed, argument :start_date_is_fixed,
GraphQL::BOOLEAN_TYPE, GraphQL::BOOLEAN_TYPE,
required: false, required: false,
description: 'Indicates start date should be sourced from start_date_fixed field not the issue milestones' description: 'Indicates start date should be sourced from start_date_fixed field not the issue milestones.'
argument :due_date_is_fixed, argument :due_date_is_fixed,
GraphQL::BOOLEAN_TYPE, GraphQL::BOOLEAN_TYPE,
required: false, required: false,
description: 'Indicates end date should be sourced from due_date_fixed field not the issue milestones' description: 'Indicates end date should be sourced from due_date_fixed field not the issue milestones.'
argument :add_label_ids, argument :add_label_ids,
[GraphQL::ID_TYPE], [GraphQL::ID_TYPE],
required: false, required: false,
......
...@@ -10,12 +10,12 @@ module Mutations ...@@ -10,12 +10,12 @@ module Mutations
argument :base_epic_id, argument :base_epic_id,
::Types::GlobalIDType[::Epic], ::Types::GlobalIDType[::Epic],
required: true, required: true,
description: 'The ID of the base epic of the tree' description: 'The ID of the base epic of the tree.'
argument :moved, argument :moved,
Types::EpicTree::EpicTreeNodeInputType, Types::EpicTree::EpicTreeNodeInputType,
required: true, required: true,
description: 'Parameters for updating the tree positions' description: 'Parameters for updating the tree positions.'
def resolve(args) def resolve(args)
moving_object_id = args[:moved][:id] moving_object_id = args[:moved][:id]
......
...@@ -11,16 +11,16 @@ module Mutations ...@@ -11,16 +11,16 @@ module Mutations
argument :project_path, GraphQL::ID_TYPE, argument :project_path, GraphQL::ID_TYPE,
required: true, required: true,
description: 'The full path of the project the issue belongs to' description: 'The full path of the project the issue belongs to.'
argument :issue_iid, GraphQL::STRING_TYPE, argument :issue_iid, GraphQL::STRING_TYPE,
required: true, required: true,
description: 'The IID of the issue to be added' description: 'The IID of the issue to be added.'
field :epic_issue, field :epic_issue,
Types::EpicIssueType, Types::EpicIssueType,
null: true, null: true,
description: 'The epic-issue relation' description: 'The epic-issue relation.'
def resolve(group_path:, iid:, project_path:, issue_iid:) def resolve(group_path:, iid:, project_path:, issue_iid:)
epic = authorized_find!(group_path: group_path, iid: iid) epic = authorized_find!(group_path: group_path, iid: iid)
......
...@@ -7,16 +7,16 @@ module Mutations ...@@ -7,16 +7,16 @@ module Mutations
argument :iid, GraphQL::ID_TYPE, argument :iid, GraphQL::ID_TYPE,
required: true, required: true,
description: "The IID of the epic to mutate" description: "The IID of the epic to mutate."
argument :group_path, GraphQL::ID_TYPE, argument :group_path, GraphQL::ID_TYPE,
required: true, required: true,
description: 'The group the epic to mutate belongs to' description: 'The group the epic to mutate belongs to.'
field :epic, field :epic,
Types::EpicType, Types::EpicType,
null: true, null: true,
description: 'The epic after mutation' description: 'The epic after mutation.'
private private
......
...@@ -13,7 +13,7 @@ module Mutations ...@@ -13,7 +13,7 @@ module Mutations
field :epic, field :epic,
Types::EpicType, Types::EpicType,
null: true, null: true,
description: 'The created epic' description: 'The created epic.'
def resolve(args) def resolve(args)
group_path = args.delete(:group_path) group_path = args.delete(:group_path)
......
...@@ -9,7 +9,7 @@ module Mutations ...@@ -9,7 +9,7 @@ module Mutations
argument :subscribed_state, GraphQL::BOOLEAN_TYPE, argument :subscribed_state, GraphQL::BOOLEAN_TYPE,
required: true, required: true,
description: 'The desired state of the subscription' description: 'The desired state of the subscription.'
def resolve(args) def resolve(args)
group_path = args.delete(:group_path) group_path = args.delete(:group_path)
......
...@@ -10,7 +10,7 @@ module Mutations ...@@ -10,7 +10,7 @@ module Mutations
argument :state_event, argument :state_event,
Types::EpicStateEventEnum, Types::EpicStateEventEnum,
required: false, required: false,
description: 'State event for the epic' description: 'State event for the epic.'
authorize :admin_epic authorize :admin_epic
......
...@@ -10,19 +10,19 @@ module Mutations ...@@ -10,19 +10,19 @@ module Mutations
argument :project_path, GraphQL::ID_TYPE, argument :project_path, GraphQL::ID_TYPE,
required: true, required: true,
description: 'The project to create the on-call schedule in' description: 'The project to create the on-call schedule in.'
argument :name, GraphQL::STRING_TYPE, argument :name, GraphQL::STRING_TYPE,
required: true, required: true,
description: 'The name of the on-call schedule' description: 'The name of the on-call schedule.'
argument :description, GraphQL::STRING_TYPE, argument :description, GraphQL::STRING_TYPE,
required: false, required: false,
description: 'The description of the on-call schedule' description: 'The description of the on-call schedule.'
argument :timezone, GraphQL::STRING_TYPE, argument :timezone, GraphQL::STRING_TYPE,
required: true, required: true,
description: 'The timezone of the on-call schedule' description: 'The timezone of the on-call schedule.'
def resolve(args) def resolve(args)
project = authorized_find!(full_path: args[:project_path]) project = authorized_find!(full_path: args[:project_path])
......
...@@ -8,11 +8,11 @@ module Mutations ...@@ -8,11 +8,11 @@ module Mutations
argument :project_path, GraphQL::ID_TYPE, argument :project_path, GraphQL::ID_TYPE,
required: true, required: true,
description: 'The project to remove the on-call schedule from' description: 'The project to remove the on-call schedule from.'
argument :iid, GraphQL::STRING_TYPE, argument :iid, GraphQL::STRING_TYPE,
required: true, required: true,
description: 'The on-call schedule internal ID to remove' description: 'The on-call schedule internal ID to remove.'
def resolve(project_path:, iid:) def resolve(project_path:, iid:)
oncall_schedule = authorized_find!(project_path: project_path, iid: iid) oncall_schedule = authorized_find!(project_path: project_path, iid: iid)
......
...@@ -7,7 +7,7 @@ module Mutations ...@@ -7,7 +7,7 @@ module Mutations
field :oncall_schedule, field :oncall_schedule,
::Types::IncidentManagement::OncallScheduleType, ::Types::IncidentManagement::OncallScheduleType,
null: true, null: true,
description: 'The on-call schedule' description: 'The on-call schedule.'
authorize :admin_incident_management_oncall_schedule authorize :admin_incident_management_oncall_schedule
......
...@@ -8,23 +8,23 @@ module Mutations ...@@ -8,23 +8,23 @@ module Mutations
argument :project_path, GraphQL::ID_TYPE, argument :project_path, GraphQL::ID_TYPE,
required: true, required: true,
description: 'The project to update the on-call schedule in' description: 'The project to update the on-call schedule in.'
argument :iid, GraphQL::STRING_TYPE, argument :iid, GraphQL::STRING_TYPE,
required: true, required: true,
description: 'The on-call schedule internal ID to update' description: 'The on-call schedule internal ID to update.'
argument :name, GraphQL::STRING_TYPE, argument :name, GraphQL::STRING_TYPE,
required: false, required: false,
description: 'The name of the on-call schedule' description: 'The name of the on-call schedule.'
argument :description, GraphQL::STRING_TYPE, argument :description, GraphQL::STRING_TYPE,
required: false, required: false,
description: 'The description of the on-call schedule' description: 'The description of the on-call schedule.'
argument :timezone, GraphQL::STRING_TYPE, argument :timezone, GraphQL::STRING_TYPE,
required: false, required: false,
description: 'The timezone of the on-call schedule' description: 'The timezone of the on-call schedule.'
def resolve(args) def resolve(args)
oncall_schedule = authorized_find!(project_path: args[:project_path], iid: args[:iid]) oncall_schedule = authorized_find!(project_path: args[:project_path], iid: args[:iid])
......
...@@ -9,11 +9,11 @@ module Mutations ...@@ -9,11 +9,11 @@ module Mutations
field :project, Types::ProjectType, field :project, Types::ProjectType,
null: true, null: true,
description: 'Project that was added to the Instance Security Dashboard' description: 'Project that was added to the Instance Security Dashboard.'
argument :id, ::Types::GlobalIDType[::Project], argument :id, ::Types::GlobalIDType[::Project],
required: true, required: true,
description: 'ID of the project to be added to Instance Security Dashboard' description: 'ID of the project to be added to Instance Security Dashboard.'
def resolve(id:) def resolve(id:)
project = authorized_find!(id: id) project = authorized_find!(id: id)
......
...@@ -9,7 +9,7 @@ module Mutations ...@@ -9,7 +9,7 @@ module Mutations
argument :id, Types::GlobalIDType[::Project], argument :id, Types::GlobalIDType[::Project],
required: true, required: true,
description: 'ID of the project to remove from the Instance Security Dashboard' description: 'ID of the project to remove from the Instance Security Dashboard.'
def resolve(id:) def resolve(id:)
dashboard = authorized_find! dashboard = authorized_find!
......
...@@ -9,11 +9,11 @@ module Mutations ...@@ -9,11 +9,11 @@ module Mutations
argument :health_status, argument :health_status,
::Types::HealthStatusEnum, ::Types::HealthStatusEnum,
required: false, required: false,
description: 'The desired health status' description: 'The desired health status.'
argument :weight, GraphQL::INT_TYPE, argument :weight, GraphQL::INT_TYPE,
required: false, required: false,
description: 'The weight of the issue' description: 'The weight of the issue.'
end end
end end
end end
......
...@@ -9,12 +9,12 @@ module Mutations ...@@ -9,12 +9,12 @@ module Mutations
argument :group_path, GraphQL::ID_TYPE, argument :group_path, GraphQL::ID_TYPE,
required: false, required: false,
description: 'The group the promoted epic will belong to' description: 'The group the promoted epic will belong to.'
field :epic, field :epic,
Types::EpicType, Types::EpicType,
null: true, null: true,
description: "The epic after issue promotion" description: "The epic after issue promotion."
def resolve(project_path:, iid:, group_path: nil) def resolve(project_path:, iid:, group_path: nil)
errors = [] errors = []
......
...@@ -8,7 +8,7 @@ module Mutations ...@@ -8,7 +8,7 @@ module Mutations
argument :weight, argument :weight,
GraphQL::INT_TYPE, GraphQL::INT_TYPE,
required: true, required: true,
description: 'The desired weight for the issue' description: 'The desired weight for the issue.'
def resolve(project_path:, iid:, weight:) def resolve(project_path:, iid:, weight:)
issue = authorized_find!(project_path: project_path, iid: iid) issue = authorized_find!(project_path: project_path, iid: iid)
......
...@@ -13,35 +13,35 @@ module Mutations ...@@ -13,35 +13,35 @@ module Mutations
field :iteration, field :iteration,
Types::IterationType, Types::IterationType,
null: true, null: true,
description: 'The created iteration' description: 'The created iteration.'
argument :group_path, GraphQL::ID_TYPE, argument :group_path, GraphQL::ID_TYPE,
required: false, required: false,
description: "The target group for the iteration" description: "The target group for the iteration."
argument :project_path, GraphQL::ID_TYPE, argument :project_path, GraphQL::ID_TYPE,
required: false, required: false,
description: "The target project for the iteration" description: "The target project for the iteration."
argument :title, argument :title,
GraphQL::STRING_TYPE, GraphQL::STRING_TYPE,
required: false, required: false,
description: 'The title of the iteration' description: 'The title of the iteration.'
argument :description, argument :description,
GraphQL::STRING_TYPE, GraphQL::STRING_TYPE,
required: false, required: false,
description: 'The description of the iteration' description: 'The description of the iteration.'
argument :start_date, argument :start_date,
GraphQL::STRING_TYPE, GraphQL::STRING_TYPE,
required: false, required: false,
description: 'The start date of the iteration' description: 'The start date of the iteration.'
argument :due_date, argument :due_date,
GraphQL::STRING_TYPE, GraphQL::STRING_TYPE,
required: false, required: false,
description: 'The end date of the iteration' description: 'The end date of the iteration.'
def resolve(args) def resolve(args)
validate_arguments!(args) validate_arguments!(args)
......
...@@ -5,12 +5,12 @@ module Mutations ...@@ -5,12 +5,12 @@ module Mutations
class Base < ::Mutations::BaseMutation class Base < ::Mutations::BaseMutation
argument :id, ::Types::GlobalIDType[::Namespace], argument :id, ::Types::GlobalIDType[::Namespace],
required: true, required: true,
description: 'The global ID of the namespace to mutate' description: 'The global ID of the namespace to mutate.'
field :namespace, field :namespace,
Types::NamespaceType, Types::NamespaceType,
null: true, null: true,
description: 'The namespace after mutation' description: 'The namespace after mutation.'
private private
......
...@@ -12,11 +12,11 @@ module Mutations ...@@ -12,11 +12,11 @@ module Mutations
argument :title, GraphQL::STRING_TYPE, argument :title, GraphQL::STRING_TYPE,
required: true, required: true,
description: 'The test case title' description: 'The test case title.'
argument :description, GraphQL::STRING_TYPE, argument :description, GraphQL::STRING_TYPE,
required: false, required: false,
description: 'The test case description' description: 'The test case description.'
argument :label_ids, argument :label_ids,
[GraphQL::ID_TYPE], [GraphQL::ID_TYPE],
...@@ -25,11 +25,11 @@ module Mutations ...@@ -25,11 +25,11 @@ module Mutations
argument :project_path, GraphQL::ID_TYPE, argument :project_path, GraphQL::ID_TYPE,
required: true, required: true,
description: 'The project full path to create the test case' description: 'The project full path to create the test case.'
field :test_case, Types::IssueType, field :test_case, Types::IssueType,
null: true, null: true,
description: 'The test case created' description: 'The test case created.'
def resolve(args) def resolve(args)
project_path = args.delete(:project_path) project_path = args.delete(:project_path)
......
...@@ -7,19 +7,19 @@ module Mutations ...@@ -7,19 +7,19 @@ module Mutations
field :requirement, Types::RequirementsManagement::RequirementType, field :requirement, Types::RequirementsManagement::RequirementType,
null: true, null: true,
description: 'Requirement after mutation' description: 'Requirement after mutation.'
argument :title, GraphQL::STRING_TYPE, argument :title, GraphQL::STRING_TYPE,
required: false, required: false,
description: 'Title of the requirement' description: 'Title of the requirement.'
argument :description, GraphQL::STRING_TYPE, argument :description, GraphQL::STRING_TYPE,
required: false, required: false,
description: 'Description of the requirement' description: 'Description of the requirement.'
argument :project_path, GraphQL::ID_TYPE, argument :project_path, GraphQL::ID_TYPE,
required: true, required: true,
description: 'Full project path the requirement is associated with' description: 'Full project path the requirement is associated with.'
end end
end end
end end
...@@ -9,15 +9,15 @@ module Mutations ...@@ -9,15 +9,15 @@ module Mutations
argument :state, Types::RequirementsManagement::RequirementStateEnum, argument :state, Types::RequirementsManagement::RequirementStateEnum,
required: false, required: false,
description: 'State of the requirement' description: 'State of the requirement.'
argument :iid, GraphQL::STRING_TYPE, argument :iid, GraphQL::STRING_TYPE,
required: true, required: true,
description: 'The IID of the requirement to update' description: 'The IID of the requirement to update.'
argument :last_test_report_state, Types::RequirementsManagement::TestReportStateEnum, argument :last_test_report_state, Types::RequirementsManagement::TestReportStateEnum,
required: false, required: false,
description: 'Creates a test report for the requirement with the given state' description: 'Creates a test report for the requirement with the given state.'
def ready?(**args) def ready?(**args)
update_args = [:title, :state, :last_test_report_state, :description] update_args = [:title, :state, :last_test_report_state, :description]
......
...@@ -10,17 +10,17 @@ module Mutations ...@@ -10,17 +10,17 @@ module Mutations
argument :project_path, GraphQL::ID_TYPE, argument :project_path, GraphQL::ID_TYPE,
required: true, required: true,
description: 'Full path of the project' description: 'Full path of the project.'
argument :configuration, ::Types::CiConfiguration::Sast::InputType, argument :configuration, ::Types::CiConfiguration::Sast::InputType,
required: true, required: true,
description: 'SAST CI configuration for the project' description: 'SAST CI configuration for the project.'
field :status, GraphQL::STRING_TYPE, null: false, field :status, GraphQL::STRING_TYPE, null: false,
description: 'Status of creating the commit for the supplied SAST CI configuration' description: 'Status of creating the commit for the supplied SAST CI configuration.'
field :success_path, GraphQL::STRING_TYPE, null: true, field :success_path, GraphQL::STRING_TYPE, null: true,
description: 'Redirect path to use when the response is successful' description: 'Redirect path to use when the response is successful.'
authorize :push_code authorize :push_code
......
...@@ -9,12 +9,12 @@ module Mutations ...@@ -9,12 +9,12 @@ module Mutations
field :vulnerability, Types::VulnerabilityType, field :vulnerability, Types::VulnerabilityType,
null: true, null: true,
description: 'The vulnerability after state change' description: 'The vulnerability after state change.'
argument :id, argument :id,
::Types::GlobalIDType[::Vulnerability], ::Types::GlobalIDType[::Vulnerability],
required: true, required: true,
description: 'ID of the vulnerability to be confirmed' description: 'ID of the vulnerability to be confirmed.'
def resolve(id:) def resolve(id:)
vulnerability = authorized_find!(id: id) vulnerability = authorized_find!(id: id)
......
...@@ -9,22 +9,22 @@ module Mutations ...@@ -9,22 +9,22 @@ module Mutations
field :vulnerability, Types::VulnerabilityType, field :vulnerability, Types::VulnerabilityType,
null: true, null: true,
description: 'The vulnerability after dismissal' description: 'The vulnerability after dismissal.'
argument :id, argument :id,
::Types::GlobalIDType[::Vulnerability], ::Types::GlobalIDType[::Vulnerability],
required: true, required: true,
description: 'ID of the vulnerability to be dismissed' description: 'ID of the vulnerability to be dismissed.'
argument :comment, argument :comment,
GraphQL::STRING_TYPE, GraphQL::STRING_TYPE,
required: false, required: false,
description: 'Comment why vulnerability should be dismissed' description: 'Comment why vulnerability should be dismissed.'
argument :dismissal_reason, argument :dismissal_reason,
Types::Vulnerabilities::DismissalReasonEnum, Types::Vulnerabilities::DismissalReasonEnum,
required: false, required: false,
description: 'Reason why vulnerability should be dismissed' description: 'Reason why vulnerability should be dismissed.'
def resolve(id:, comment: nil, dismissal_reason: nil) def resolve(id:, comment: nil, dismissal_reason: nil)
vulnerability = authorized_find!(id: id) vulnerability = authorized_find!(id: id)
......
...@@ -9,12 +9,12 @@ module Mutations ...@@ -9,12 +9,12 @@ module Mutations
field :vulnerability, Types::VulnerabilityType, field :vulnerability, Types::VulnerabilityType,
null: true, null: true,
description: 'The vulnerability after state change' description: 'The vulnerability after state change.'
argument :id, argument :id,
::Types::GlobalIDType[::Vulnerability], ::Types::GlobalIDType[::Vulnerability],
required: true, required: true,
description: 'ID of the vulnerability to be resolved' description: 'ID of the vulnerability to be resolved.'
def resolve(id:) def resolve(id:)
vulnerability = authorized_find!(id: id) vulnerability = authorized_find!(id: id)
......
...@@ -9,12 +9,12 @@ module Mutations ...@@ -9,12 +9,12 @@ module Mutations
field :vulnerability, Types::VulnerabilityType, field :vulnerability, Types::VulnerabilityType,
null: true, null: true,
description: 'The vulnerability after revert' description: 'The vulnerability after revert.'
argument :id, argument :id,
::Types::GlobalIDType[::Vulnerability], ::Types::GlobalIDType[::Vulnerability],
required: true, required: true,
description: 'ID of the vulnerability to be reverted' description: 'ID of the vulnerability to be reverted.'
def resolve(id:) def resolve(id:)
vulnerability = authorized_find!(id: id) vulnerability = authorized_find!(id: id)
......
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