Close todos when accepting a MR via the API.
What does this MR do?
Closes todos for a merge request when the MR is accepted via the API by the MR assignee. See #22477 (closed).
Are there points in the code the reviewer needs to double check?
I put the TodoService call in MergeRequests::MergeService but perhaps it should go in MergeRequests::PostMergeService. MergeRequests::CreateService calls TodoService directly. moved to PostMergeService
Please review refresh service test changes to see if they are correct - I think in those cases, the todos should actually be cleared instead of left pending.
Why was this MR needed?
To make the API behavior consistent with the UI behavior (accepting your own MRs closes the todo item and prevents them from piling up).
Does this MR meet the acceptance criteria?
-
CHANGELOG entry added - Documentation created/updated (N/A)
-
API support added - Tests
-
Added for this feature/bug -
All builds are passing (some tests failed but are not related to this change)
-
-
Conform by the merge request performance guides -
Conform by the style guides -
Branch has no merge conflicts with master
(if you do - rebase it please) -
Squashed related commits together
What are the relevant issue numbers?
Closes #22477 (closed)