I am logged in as root using gitlab-api with Python. On the server, I have a git repository which consists of my template ( example ) code. This template code is however not under Adminstrator, but under my own namespace ( teacher/template) . I want to distribute this template project to 25 students as an assignment i.e fork this template to 25 additional projects, but in a different namespace/group such as StudentsGroup/assignment1, StudentsGroup/assignment2... and soforth.
Can anyone tell me what is the best way to achieve it?
In the gitlab api, I have seen two possibilities:
First option:
Admin fork relation
Allows modification of the forked relationship between existing projects. Available only for admins. Create a forked from/to relation between existing projects.
POST /projects/:id/fork/:forked_from_id
Parameters:
id (required) - The ID of the project
forked_from_id: (required) - The ID of the project that was forked from
Second option:
Fork project
Forks a project into the user namespace of the authenticated user.
POST /projects/fork/:id
Parameters:
id (required) - The ID of the project to be forked