Skip to content

Commit

Permalink
Merge pull request #154 from derek-austin/patch-1
Browse files Browse the repository at this point in the history
Create a project in a group
  • Loading branch information
Gauvain Pocentek committed Sep 22, 2016
2 parents 1e1d467 + b057a94 commit 4390afb
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions docs/gl_objects/projects.rst
Expand Up @@ -46,6 +46,16 @@ Create a project for a user (admin only):
:start-after: # user create
:end-before: # end user create

Create a project in a group:

You need to get the id of the group, then use the namespace_id attribute to create the group:

.. code:: python
group_id = gl.groups.search('my-group')[0].id
project = gl.projects.create({'name': 'myrepo', 'namespace_id': group_id})
Update a project:

.. literalinclude:: projects.py
Expand Down

0 comments on commit 4390afb

Please sign in to comment.