Improve Duo review request messaging and defaults

What does this MR do and why?

Improves the review request flow on /manage-merge-request:

  1. Revises the Duo-only review comment so contributors critically evaluate GitLab Duo's feedback: apply the suggestions they're confident about, leave a note on anything they question, then request a review from the suggested reviewer.
  2. Changes which reviewer is preselected:
    • when Duo is the only reviewer and hasn't reviewed yet, Duo is preselected, as before.
    • when Duo is the only reviewer and has reviewed, the suggested reviewer is preselected instead. Detected via GitLab's GraphQL API (mergeRequestInteraction.reviewed on each reviewer).
    • when other reviewers are already assigned, nothing is preselected.

Related to #627 (closed)

Validation steps

Open /manage-merge-request?projectId=<id>&mergeRequestIid=<iid> for:

  1. an MR where Duo is the only reviewer and hasn't reviewed: Duo is preselected.
  2. an MR where Duo is the only reviewer and has reviewed: the suggested reviewer is preselected.
  3. an MR with other reviewers assigned: nothing is preselected.

/cc @leetickett-gitlab

Edited by Salim Zidane

Merge request reports

Loading
Loading