Expose merge conflicts status to the MR API
Description
The API response for MRs does not contain information whether there are any conflicts preventing the MR from merging. The only remotely similar field is "merge_status": "cannot_be_merged"
, which does not provide a reason for the inability to merge (not approved, pipeline fail, or merge conflict).
Proposal
Expose a new field in the MR API, indicating whether the MR has merge conflicts.
Links / references
https://docs.gitlab.com/ee/api/merge_requests.html
Overview
Our team has a bot that uses the GitLab API to coordinate work, mainly checking the MRs and alerting about their status. We wanted to add a new functionality: the robot should alert when there is a MR with merge conflicts. However, there is no such field exposed to the API.
Use cases
This would help all teams that use the GitLab API to monitor MRs and send status alerts.
Feature checklist
Make sure these are completed before closing the issue, with a link to the relevant commit.
-
Feature assurance -
Documentation -
Added to features.yml