Accept comment in VulnerabilityConfirm GraphQL mutation
What does this MR do and why?
This comment allows you to specify a comment when marking a Vulnerability as confirmed.
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 - Run the following mutation
mutation($input: VulnerabilityConfirmInput!) {
vulnerabilityConfirm(input: $input) {
vulnerability {
id
state
stateComment
}
}
}
{
"input": {
"id": "gid://gitlab/Vulnerability/<id here>",
"clientMutationId": "something",
"comment": "test"
}
}
- New state should be
CONFIRMED
,stateComment
should be populated 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 #373966 (closed)
Edited by Michał Zając