Extend API to add/delete submodules

Problem to solve

For automation purpose, it would be nice to be able to add or remove a submodule using the API.

Target audience

Further details

There is an API endpoint to update an existing submodule reference in a repository: https://docs.gitlab.com/ee/api/repository_submodules.html

PUT /projects/:id/repository/submodules/:submodule

Proposal

Add 2 new endpoints:

  • DELETE /projects/:id/repository/submodules/:submodule to delete a submodule
  • POST /projects/:id/repository/submodules/:submodule to add a new submodule

What does success look like, and how can we measure that?

Being able to add and delete submodules via the API.

Links / references