GitHub Importer - Default to the current group when importing from GitHub
Problem to Solve
When importing a project from GitHub by clicking the New project
button, when I arrive on the page with the list of GitHub projects to select, the default group in the "To GitLab" column is my personal namespace and not the namespace of the group where I initiated the import flow.
This is confusing and it may lead to company projects being created in the employees' personal namespaces.
This flow can be observed in this video.
Proposed Solution
On the GitHub Importer page, default the destination group to the namespace from which the New project
button was selected.
This already works for creating blank new projects and importing GitLab projects from an export file. The way this seems to work for new projects, for example is that the URL loaded after selecting the New project
button contains the namespace, i.e. https://gitlab.com/projects/new?namespace_id=9970
.
From there, the "Create blank project" page has this URL - https://gitlab.com/projects/new?namespace_id=9970#blank_project
. However, the GitHub Importer does not carry that parameter - https://gitlab.com/import/github/status
.
Further iterations
This issue may also need to be solved for other importers.
Additionally, we should consider defaulting to the currently selected group when creating projects from the +
navigation menu selection.