class TemporaryNiogitService {

    public void importProjects(Path actualTarget) {
        OrganizationalUnit ou = ouService.createOrganizationalUnit(OU_NAME, "org.migration", Collections.emptyList(), Collections.singletonList(new Contributor(OU_OWNER, ContributorType.OWNER)));
        String repositoryURL = actualTarget.toUri().toString();
        RepositoryEnvironmentConfigurations configurations = new RepositoryEnvironmentConfigurations();
        Map<String, Object> configMap = configurations.getConfigurationMap();
        configMap.put(EnvironmentParameters.AVOID_INDEX, "true");
        configMap.put("origin", repositoryURL);

        Repository repo = repoService.createRepository(ou, GitRepository.SCHEME.toString(), TMP_REPO_ALIAS, configurations);
        WorkspaceProject project = projectService.resolveProject(repo);
        migrationService.migrate(project);
        repoService.removeRepository(ou.getSpace(), TMP_REPO_ALIAS);
    }

    @Inject public  TemporaryNiogitService(OrganizationalUnitService ouService,
                                  RepositoryService repoService,
                                  WorkspaceProjectService projectService,
                                  WorkspaceProjectMigrationService migrationService);

}