Import repositories API endpoint
Background:
Automate import of Github repository by doing it via API calls
What questions are you trying to answer? How do I automate the manual import process documented on https://docs.gitlab.com/ee/user/project/settings/import_export.html#importing-the-project
Are you looking to verify an existing hypothesis or uncover new issues you should be exploring?
What is the backstory of this project and how does it impact the approach? Migration of hundreds of github repositories into different gitlab groups, with other actions done during the migration to setup CI around those imported repositories
What do you already know about the areas you are exploring?
I did that process manually for a few repositories, but I was unable to find anything concerning the automation of repositories import in the API or gitlab documentation.
Importing project is done by the ImportService
class, so I envision that this could be done by adding a new endpoint in the [project API[(https://gitlab.com/gitlab-org/gitlab-ce/blob/master/lib/api/projects.rb) like /projects/import
or via its own API class.
What does success look like at the end of the project? We are able to script the migration of our hundreds of repositories into different groups so that the whole processed is just executing code rather than UI actions.
Links / references:
https://docs.gitlab.com/ee/user/project/settings/import_export.html#importing-the-project