Skip to content

Commit df6075d

Browse files
committed
Return new project info on project creation
1 parent 297a0e3 commit df6075d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

gitlab/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -236,15 +236,15 @@ def createProject(self, name, description="", default_branch="", issues_enabled=
236236
"""
237237
Create a project
238238
:param name: Obligatory
239-
:return: True if it created the project, False otherwise
239+
:return: Dict of information on the newly created project if successful, False otherwise
240240
"""
241241
data = {"name": name, "description": description, "default_branch": default_branch,
242242
"issues_enabled": issues_enabled, "wall_enabled": wall_enabled,
243243
"merge_requests_enabled": merge_requests_enabled, "wiki_enabled": wiki_enabled,
244244
"snippets_enabled": snippets_enabled}
245245
r = requests.post(self.projects_url, headers=self.headers, data=data)
246246
if r.status_code == 201:
247-
return True
247+
return json.loads(r.content)
248248
else:
249249
print r
250250
return False

0 commit comments

Comments
 (0)