python-gitlab3 icon indicating copy to clipboard operation
python-gitlab3 copied to clipboard

Creation of projects in groups

Open Heiko-san opened this issue 9 years ago • 4 comments

Creating a project within a group / namespace seems to be only possible by:

repo = gl.add_project(reponame) # this creates the project in the user's namespace
if repo:
    mygroup.transfer_project(repo.id) # api user needs admin rights for this, while directly creating it within group mygroup would work since it is a master user on the group :(

Heiko-san avatar Mar 02 '16 22:03 Heiko-san

Another way to do it is https://github.com/samrocketman/gitlab-mirrors/blob/69274d85593d82f752b9afbd2226783015564b7b/lib/manage_gitlab_project.py#L65-L78

samrocketman avatar Mar 03 '16 01:03 samrocketman

Oh ok , thanks, I didn't find this in the documentation, so I switched to python-gitlab meanwhile which works just fine. :)

Heiko-san avatar Mar 11 '16 18:03 Heiko-san

Not a bad choice. The maintainer is more active.

samrocketman avatar Mar 17 '16 04:03 samrocketman

Heiko, could you add the extra information into the documentation? Your help would be great to fill in the gaps.

Info: namespace_id is used to set the group, other options should be documented too.

doctormo avatar Feb 16 '17 20:02 doctormo