Skip to content

Commit

Permalink
Create a project in a group
Browse files Browse the repository at this point in the history
Just a sketch, feel free to toss it and do it in the right way.
  • Loading branch information
derek-austin committed Sep 21, 2016
1 parent 1e1d467 commit b057a94
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 b057a94

Please sign in to comment.