When I request, merge request of a particular project (having state opened), I got the response like this.
[{
“id”: 253,
“iid”: 3,
“project_id”: 6895,
“title”: “Merge to the master branch”,
“description”: null,
“state”: “opened”,
“merged_by”: null,
“merged_at”: null,
“closed_by”: null,
“closed_at”: null,
“target_branch”: “master”,
“source_branch”: “draft”,
“user_notes_count”: 0,
“upvotes”: 0,
“downvotes”: 0,
“assignee”: null,
“author”: {
“id”: 5,
“name”: “xxxxx”,
“username”: “xxx”,
“state”: “active”,
“avatar_url”: “xxxxx”,
“web_url”: “xx”
},
“assignees”: ,
“source_project_id”: 6895,
“target_project_id”: 6895,
“labels”: ,
“work_in_progress”: false,
“milestone”: null,
“merge_when_pipeline_succeeds”: false,
“merge_status”: “cannot_be_merged”,
“sha”: “0a375a86cc753ea3fe78a2fc50c0a1cdf302ab38”,
“merge_commit_sha”: null,
“squash_commit_sha”: null,
“discussion_locked”: null,
“should_remove_source_branch”: null,
“force_remove_source_branch”: null,
“reference”: “!3”,
“references”: {
“short”: “!3”,
“relative”: “!3”,
“full”: “xxx”
},
“web_url”: “xxxx”,
“time_stats”: {
“time_estimate”: 0,
“total_time_spent”: 0,
“human_time_estimate”: null,
“human_total_time_spent”: null
},
“squash”: false,
“task_completion_status”: {
“count”: 0,
“completed_count”: 0
},
“has_conflicts”: true,
“blocking_discussions_resolved”: true
}]
The “has_conflicts” status is true and “merge_status” is “cannot_be_merged”, So I can’t merge the project. How can I solve this issue using API?