Skip to content

Allow /submit_review to submit review regardless of draft notes

Ash McKenzie requested to merge ashmckenzie/improve-submit-review into master

What does this MR do and why?

This MR updates the logic that allows 'submitting a review' to support a scenario where one or more comments were made against an MR but weren't made via the 'add to review' method and so is impossible to mark your comments as 'your review'.

The logic change here allows one to send the /submit_review quick action via a comment which will update the comment authors MR review state from unreviewed to reviewed and have the image symbol present, .e.g

image

How to set up and validate locally

  1. Get a GDK instance up-and-running using gitlab-org/gitlab master branch
  2. Using your GDK instance, pick a random Project that has MRs and open one up
  3. In the MR, add yourself as a reviewer
  4. Scroll to the bottom of the MR and in the textarea, enter /submit_review and click 'Comment' and observe there is no image symbol
  5. In your <GDK_ROOT>/gitlab directory, run git fetch ; git checkout ashmckenzie/improve-submit-review
  6. Run a gdk restart and wait until your GDK is booted back up
  7. Retry step 4. and observe the image symbol IS present
  8. It's also worth testing the existing logic of starting a review and submitted a review to ensure this continues to work the same

MR acceptance checklist

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

Edited by Ash McKenzie

Merge request reports