Extract common code for Vulnerability state transition mutations

Why are we doing this work?

As @mallocke pointed out in !113722 (comment 1303206065) – there is enough cut and paste similarity between the mutations so it's a good idea to extract a superclass or concern for the mutations

Implementation plan

  • Extract a concern or super class with the common behaviour for the following GQL mutation classes. In these cases it is likely just a shared argument concern similar to https://gitlab.com/gitlab-org/gitlab/blob/master/ee/app/graphql/mutations/concerns/mutations/shared_epic_arguments.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
  • Extract a concern or superclass for the common behaviour in the related 'state transition' service classes:
    • ee/app/services/vulnerabilities/confirm_service.rb
    • ee/app/services/vulnerabilities/dismiss_service.rb
    • ee/app/services/vulnerabilities/resolve_service.rb
    • ee/app/services/vulnerabilities/revert_to_detected_service.rb
  • Extract specs to shared examples where appropriate
Edited by Malcolm Locke