Improve error message when assigned to MR with unresolved threads
arvidj opened this issue · 2 comments
arvidj commented
Currently, the message posted by marge on when attempting to merge an MR with outstanding threads is only:
I couldn't merge this branch: Merge request was rejected by GitLab: 'Branch cannot be merged'
and the log message is:
| 2021-07-08 11:01:26,671 WARNING I couldn't merge this branch: Merge request was rejected by GitLab: 'Branch cannot be merged'
This could be improved by extending
def ensure_mergeable_mr(self, merge_request):
by retrieving all notes in the mr, and checking that all notes that are resolvable are also resolved.
snim2 commented
I think it might be even simpler than that. In the GitLab MR API there's a JSON key blocking_discussions_resolved
which we can check.
snim2 commented
OK, PR up and ready for review...