doctormo / python-gitlab3

Python wrapper for the entire GitLab API
GNU Lesser General Public License v3.0
46 stars 25 forks source link

Creation of projects in groups #27

Open Heiko-san opened 8 years ago

Heiko-san commented 8 years ago

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 :(
samrocketman commented 8 years ago

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

Heiko-san commented 8 years ago

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

samrocketman commented 8 years ago

Not a bad choice. The maintainer is more active.

doctormo commented 7 years ago

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.