VulnerabilityRevertToDetected: dont fail when no comment is given
requested to merge 394846-fix-missing-keyword-comment-on-vulnerabilityreverttodetected-graphql-mutation into master
What does this MR do and why?
This MR fixes VulnerabilityRevertToDetected
GraphQL mutation so it doesn't error out when no comment is provided
How to set up and validate locally
- Make sure you have a project with Vulnerabilities
-
Feature.enable(:deprecate_vulnerabilities_feedback)
(this is optional butstateComment
field will benull
no matter what you pass - Go to
Vulnerability report
, find a vulnerability, note down the id and mark it as resolved - Run the following mutation
mutation($input: VulnerabilityRevertToDetectedInput!) {
vulnerabilityRevertToDetected(input: $input) {
vulnerability {
id
state
stateComment
}
}
}
{
"input": {
"id": "gid://gitlab/Vulnerability/<id here>",
"clientMutationId": "something"
}
}
- New state should be
DETECTED
,stateComment
should benil
if you enabled the feature flag
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #394846 (closed)