Skip to content

Refactor vulnerability header

Samantha Ming requested to merge 490302-refactor-resolution-button into master

What does this MR do and why?

This refactors to the vulnerability header component. Instead of passing all the individual conditions. We abstract that into a single condition and passed that down as a prop:

- :explain-with-ai-ability="glAbilities.explainVulnerabilityWithAi"
- :ai-explanation-available="vulnerability.aiExplanationAvailable"
+ :show-explain-with-ai="canExplainWithAi"

This also makes it consistent with the rest of the actions:

 :show-download-patch="canDownloadPatch"
 :show-create-merge-request="canCreateMergeRequest"
+:show-explain-with-ai="canExplainWithAi"
+:show-resolve-with-ai="canResolveWithAi"

MR acceptance checklist

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

Related to #490302 (closed)

Edited by Samantha Ming

Merge request reports

Loading