Fixes a bug where a reviewers approved state would be removed
What does this MR do and why?
If a reviewer approves and then leaves a review the reviewers approved status will be removed. This fixes that bug by keeping the approved state if the user leaves a review with only a comment.
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
How to set up and validate locally
- Assign yourself as a reviewer
- Approve a merge request
- Start a new review
- Submit the review with a comment (not requesting changes)
- Verify in the Rails console with something like:
MergeRequestReviewer.last.approved?