Allow /submit_review to submit review regardless of draft notes
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 symbol present, .e.g
How to set up and validate locally
- Get a GDK instance up-and-running using
gitlab-org/gitlab
master
branch - Using your GDK instance, pick a random Project that has MRs and open one up
- In the MR, add yourself as a reviewer
- Scroll to the bottom of the MR and in the textarea, enter
/submit_review
and click 'Comment' and observe there is no symbol - In your
<GDK_ROOT>/gitlab
directory, rungit fetch ; git checkout ashmckenzie/improve-submit-review
- Run a
gdk restart
and wait until your GDK is booted back up - Retry step 4. and observe the symbol IS present
- 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.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Ash McKenzie