Ensure import by URL works after a failed import
If a project fails to import a project with one of the built-in
importers (e.g. GitHub, Bitbucket, GitLab project templates, etc.), a
user will be redirected to the /import/new
page. The user can attempt
to import with a Git repository URL, but that would also fail because
import_type
remained what it was set to initially
(e.g. gitlab_project
). This caused ImportService
to use the previous
importer instead of attempting to use the URL.
To fix this problem, we set import_type
to git
whenever the import
by URL parameters are used. This is mapped to a nil
importer in
Gitlab::ImportSources
.
Closes #31589 (closed)
Edited by 🤖 GitLab Bot 🤖