Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Jérome Perrin
gitlab-ce
Commits
6579de07
Commit
6579de07
authored
Jan 06, 2014
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #5799 from criteo/import_url_api
Add import_url param in API projects create
parents
651a0dd5
cd8a90ee
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
1 deletion
+3
-1
doc/api/projects.md
doc/api/projects.md
+1
-0
lib/api/projects.rb
lib/api/projects.rb
+2
-1
No files found.
doc/api/projects.md
View file @
6579de07
...
@@ -239,6 +239,7 @@ Parameters:
...
@@ -239,6 +239,7 @@ Parameters:
+
`snippets_enabled`
(optional)
+
`snippets_enabled`
(optional)
+
`public`
(optional) - if
`true`
same as setting visibility_level = 20
+
`public`
(optional) - if
`true`
same as setting visibility_level = 20
+
`visibility_level`
(optional)
+
`visibility_level`
(optional)
*
`import_url`
(optional)
### Create project for user
### Create project for user
...
...
lib/api/projects.rb
View file @
6579de07
...
@@ -99,7 +99,8 @@ module API
...
@@ -99,7 +99,8 @@ module API
:snippets_enabled
,
:snippets_enabled
,
:namespace_id
,
:namespace_id
,
:public
,
:public
,
:visibility_level
]
:visibility_level
,
:import_url
]
attrs
=
map_public_to_visibility_level
(
attrs
)
attrs
=
map_public_to_visibility_level
(
attrs
)
@project
=
::
Projects
::
CreateContext
.
new
(
current_user
,
attrs
).
execute
@project
=
::
Projects
::
CreateContext
.
new
(
current_user
,
attrs
).
execute
if
@project
.
saved?
if
@project
.
saved?
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment