Implement API endpoint for creating merge request dependency
In order for an API consumer to manage merge request dependencies, API endpoints should be implemented. Currently, they are only manageable via the web UI.
Proposal
This issue is specific for implementing endpoint for adding a merge request dependency: POST /projects/:id/merge_requests/:iid/blocks
.
We'll need to evaluate if we can re-use the existing MergeRequests::UpdateBlocksService
for creating a dependency. If not, we'll need to create a specific service for creation.
Question to be confirmed:
- Is it enough to accept the Merge Request ID to set the blocking merge request of the merge request dependency being created? This is inconsistent with how we set the dependency on the web UI (we set them by using references (e.g.
!1
) or MR link). But since we're dealing with API calls here, MR ID (not IID) should be enough to keep it simple.
Edited by Patrick Bajao