FE: Update bot comment on MR for warn mode

Why are we doing this work

When a policy is created that has a warn mode, the bot comment message produced by it should guide the developer as to what the next steps are

Relevant links

!175906 (comment 2274536930)

image

Considering the backend requirements, perhaps there's a short term solution for this aspect, such as a link to the policy with some simple language for developers to find the policy owners? We can then fill that in with a follow up backend / frontend task to populate the details?

Another consideration - maybe we wouldn't want to add every individual if the policy requires approval from a given role, or even if a group has many members, that could make the comment extremely long :thinking:

Current design states:

> The following policies are triggered by the merge request:

Maybe we can say something more like:

> Review the following policies to understand requirements and identify policy owners for support:
>
> * Policy 1
> * Policy 2

Non-functional requirements

  • Documentation:
  • Feature flag:
  • Performance:
  • Testing:

Implementation plan

Verification steps

  1. Upload a GitLab Ultimate license
  2. Enable the feature flag echo "Feature.enable(:security_policy_approval_warn_mode)" | rails c
  3. Navigate to a project/group => Secure => Policies => New policy => Merge request approval policy
  4. Create a policy with warn mode
  5. Create an MR on the project that triggers the policy with warn mode
  6. Verify the bot comment appears on the MR
Edited by Alexander Turinske