Commit dd653f62f3bf07e1ea2260b06cd44ab1aaba028b

Authored by Matt Humphrey
1 parent 1cfc2b6f

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'.
Showing 1 changed file with 2 additions and 1 deletions   Show diff stats
lib/api/projects.rb
@@ -42,7 +42,8 @@ module Gitlab @@ -42,7 +42,8 @@ module Gitlab
42 :issues_enabled, 42 :issues_enabled,
43 :wall_enabled, 43 :wall_enabled,
44 :merge_requests_enabled, 44 :merge_requests_enabled,
45 - :wiki_enabled] 45 + :wiki_enabled
  46 + :namespace_id]
46 @project = ::Projects::CreateContext.new(current_user, attrs).execute 47 @project = ::Projects::CreateContext.new(current_user, attrs).execute
47 if @project.saved? 48 if @project.saved?
48 present @project, with: Entities::Project 49 present @project, with: Entities::Project