Fixes a bug with attention requested state
What does this MR do and why?
Fixes a race condition bug in the attention requested state on assignees and reviewers. If the user is already a reviewer/assignee and has a different to the default :attention_requested
and get added as either a reviewer/assignee the state of that user will be out of sync, whereas the state should match.
This fix changes that by searching for the reviewer/assignee state first, if it doesn't exist then we default to :attention_requested
.
I've also changed the merge request controllers update method to use the correct serializer so that the the data we get back has the correct state data.
Screenshots or screen recordings
How to set up and validate locally
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.