Add listing of top level groups to BulkImportsController
What does this MR do?
This MR:
- Adds
Gitlab::BulkImport::Clientto fetch top level groups from source Gitlab instance in order to import them (this will be done in the future MRs) - Implements only backend. Frontend is done in #249157 (closed)
Rails console example output:
client = Gitlab::BulkImport::Client.new(uri: "http://127.0.0.1:3000", token: "Yoh-")
serializer = BaseSerializer.new(current_user: User.first)
serializer.represent(client.get('groups', page: 1), {}, Import::BulkImportEntity)
[23] pry(main)> serializer.represent(client.get('groups', page: 1), {}, Import::BulkImportEntity)
ApplicationSetting Load (0.6ms) SELECT "application_settings".* FROM "application_settings" ORDER BY "application_settings"."id" DESC LIMIT $1 [["LIMIT", 1]]
=> [{:id=>434, :full_name=>"092s4", :full_path=>"092s4"},
{:id=>342, :full_name=>"0atco", :full_path=>"0atco"},
{:id=>284, :full_name=>"0ee3x", :full_path=>"0ee3x"},
{:id=>505, :full_name=>"0eflo", :full_path=>"0eflo"},
{:id=>152, :full_name=>"0ji7z", :full_path=>"0ji7z"},
{:id=>489, :full_name=>"0qtpw", :full_path=>"0qtpw"},
...
Mentions #249156 (closed) & &4374 (closed)
Screenshots
Does this MR meet the acceptance criteria?
Conformity
Edited by George Koltsov