Handle on click for resolve with AI split button
What does this MR do and why?
This fixes a bug when the "Resolve with AI" split button was clicked, nothing happened. This MR fixes that by ensuring the correct event name is used. Now when it is clicked, it will emit properly and trigger the AI action
Screenshots or screen recordings
resolve-with-ai-trigger-ai-action
Note: You may notice the loading state doesn't appear on click. I'll fix that in a follow up > #434940 (closed)
How to set up and validate locally
- Have the related FF enabled:
echo "Feature.enable(:resolve_vulnerability_ai)" | rails c
- In order to run a pipeline to generate a Vulnerability report, you'll need an EE license.
- Fork https://gitlab.com/gitlab-org/govern/demos/sandbox/minac/test-remediations (for the split button)
- Run a pipeline against the default branch. It will generate vulnerabilities.
- Go to the project vulnerability report page
- Click on the SAST vulnerability
- Click on the "Resolve with AI" button
Note: no AI MR will actually be generated as this repo doesn't contain real vulnerabilities (see comment > #432738 (comment 1663024557)). So it's okay if you see an error, we're just testing that the subscription is triggered when the button is clicked.
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 #432796 (closed)