summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorderek-austin <derek.austin35@mailinator.com>2016-09-21 10:59:51 +0200
committerGitHub <noreply@github.com>2016-09-21 10:59:51 +0200
commitb057a94e70f485b0e9d2a22572d87b975ae44002 (patch)
treec91147e0ec4de9de8bae138571ba56f236ac6ed9
parent1e1d467c9570f75027e45ec461e808617df6c0fa (diff)
downloadgitlab-b057a94e70f485b0e9d2a22572d87b975ae44002.tar.gz
Create a project in a group
Just a sketch, feel free to toss it and do it in the right way.
-rw-r--r--docs/gl_objects/projects.rst10
1 files changed, 10 insertions, 0 deletions
diff --git a/docs/gl_objects/projects.rst b/docs/gl_objects/projects.rst
index 37f04cf..afc0d3a 100644
--- a/docs/gl_objects/projects.rst
+++ b/docs/gl_objects/projects.rst
@@ -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