-
Georges Racinet authored
The only obstacle was the proper initialization of `vcs_type`. We previously had to hardcode `git` in `GitLabProjectsImportService` and in `CreateService#vcs_type` for `gitlab_project` imports, in order for Git imports to work and RSpec tests to succeed, and obviously needed to remove that. Then we introduce a new restoration step, dedicated to reading `vcs_type` from the supplied JSON file. It needs to run first, in order for the repository restoration steps to do the right thing. To avoid duplication, we derive the JSON file location and parsing from the general step meant for other attributes, that we didn't dare put before the repository steps. Finally, if the information is absent, we take for granted that the export was done on a regular upstream GitLab instance, and hence use `git` as a default value, this time from the import itself. Closes #480
0245c3d6df73