Skip to content

Include groups in import with import repos rake task

Ramya Authappan requested to merge github/fork/ndpgroup/import_w_groups into master

Created by: jflemer-ndp

The current behavior for the import repos task is to only find top-level repos, e.g. {repo_dir}/*.git. Projects already in groups (sub-directories), are not imported. This patch extends the existing import to create groups (as needed), and import projects into groups. Top-level projects are still imported with the same behavior as previously implemented.

Expand the import glob to include **/*.git to find projects in groups as well as top level projects. Check for existing group, and create group if needed. Set namespace_id for imported projects.

This has been tested (on v5.2) with a set of projects including top-level and grouped projects (one level deep only).

Merge request reports

Loading