Added namespace_id to project creation via API

This allows you to set the namespace ID for projects via the the API. By default it is created for the current user. You can assign it to the global namespace by passing `GLN` which translates to 'Global Namespace'.
This commit is contained in:
Matt Humphrey 2013-03-01 16:34:11 +00:00
parent 1cfc2b6fc7
commit dd653f62f3

View file

@ -42,7 +42,8 @@ module Gitlab
:issues_enabled, :issues_enabled,
:wall_enabled, :wall_enabled,
:merge_requests_enabled, :merge_requests_enabled,
:wiki_enabled] :wiki_enabled
:namespace_id]
@project = ::Projects::CreateContext.new(current_user, attrs).execute @project = ::Projects::CreateContext.new(current_user, attrs).execute
if @project.saved? if @project.saved?
present @project, with: Entities::Project present @project, with: Entities::Project