Unmergeable todo appears every time an MR's status is update
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/8056 added a new todo type: when an MR has MWPS set, and the merge fails because of conflicts, the merge user gets a todo.
However, this is done at the MR level, when checking the mergeable status: https://gitlab.com/gitlab-org/gitlab-ce/blob/v8.17.0/app/models/merge_request.rb#L95-97
This todo will only be created when MWPS is set: https://gitlab.com/gitlab-org/gitlab-ce/blob/v8.17.0/app/services/todo_service.rb#L131-133
The problem is that once this todo has been created once, it will be recreated every time the unmergeable status is confirmed again. That's because when an MR fails to MWPS due to conflicts, it keeps its MWPS status: https://gitlab.com/gitlab-org/gitlab-ce/blob/v8.17.0/app/services/merge_requests/merge_when_pipeline_succeeds_service.rb#L27
I think that to fix this, we should unset MWPS when an MR has conflicts. This isn't just because of the todo, but because a conflict being resolved in this case would mean the target branch changing (if the source branch changed, MWPS would be unset anyway), and that seems like a risky auto-merge.
@grzesiek @zj - I see you've touched MWPS, what do you think?