Skip to content

Commit b057a94

Browse files
author
derek-austin
authored
Create a project in a group
Just a sketch, feel free to toss it and do it in the right way.
1 parent 1e1d467 commit b057a94

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

docs/gl_objects/projects.rst

+10
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,16 @@ Create a project for a user (admin only):
4646
:start-after: # user create
4747
:end-before: # end user create
4848

49+
Create a project in a group:
50+
51+
You need to get the id of the group, then use the namespace_id attribute to create the group:
52+
53+
.. code:: python
54+
55+
group_id = gl.groups.search('my-group')[0].id
56+
project = gl.projects.create({'name': 'myrepo', 'namespace_id': group_id})
57+
58+
4959
Update a project:
5060

5161
.. literalinclude:: projects.py

0 commit comments

Comments
 (0)