Skip to content

Handle on click for resolve with AI split button

Samantha Ming requested to merge 432796-handle-ai-split-button into master

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

  1. Have the related FF enabled: echo "Feature.enable(:resolve_vulnerability_ai)" | rails c
  2. In order to run a pipeline to generate a Vulnerability report, you'll need an EE license.
  3. Fork https://gitlab.com/gitlab-org/govern/demos/sandbox/minac/test-remediations (for the split button)
  4. Run a pipeline against the default branch. It will generate vulnerabilities.
  5. Go to the project vulnerability report page
  6. Click on the SAST vulnerability
  7. 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.

error-is-okay

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #432796 (closed)

Edited by Samantha Ming

Merge request reports

Loading