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
Tatuya Kamada
gitlab-ce
Commits
66098dbb
Commit
66098dbb
authored
Jul 23, 2014
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #7089 from NARKOZ/api-patch
API patch
parents
931f27ae
1e160e13
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
1 deletion
+5
-1
doc/api/projects.md
doc/api/projects.md
+1
-0
lib/api/projects.rb
lib/api/projects.rb
+4
-1
No files found.
doc/api/projects.md
View file @
66098dbb
...
@@ -277,6 +277,7 @@ Parameters:
...
@@ -277,6 +277,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)
## Remove project
## Remove project
...
...
lib/api/projects.rb
View file @
66098dbb
...
@@ -77,6 +77,7 @@ module API
...
@@ -77,6 +77,7 @@ module API
# namespace_id (optional) - defaults to user namespace
# namespace_id (optional) - defaults to user namespace
# public (optional) - if true same as setting visibility_level = 20
# public (optional) - if true same as setting visibility_level = 20
# visibility_level (optional) - 0 by default
# visibility_level (optional) - 0 by default
# import_url (optional)
# Example Request
# Example Request
# POST /projects
# POST /projects
post
do
post
do
...
@@ -117,6 +118,7 @@ module API
...
@@ -117,6 +118,7 @@ module API
# 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)
# Example Request
# Example Request
# POST /projects/user/:user_id
# POST /projects/user/:user_id
post
"user/:user_id"
do
post
"user/:user_id"
do
...
@@ -130,7 +132,8 @@ module API
...
@@ -130,7 +132,8 @@ module API
:wiki_enabled
,
:wiki_enabled
,
:snippets_enabled
,
:snippets_enabled
,
:public
,
:public
,
:visibility_level
]
:visibility_level
,
:import_url
]
attrs
=
map_public_to_visibility_level
(
attrs
)
attrs
=
map_public_to_visibility_level
(
attrs
)
@project
=
::
Projects
::
CreateService
.
new
(
user
,
attrs
).
execute
@project
=
::
Projects
::
CreateService
.
new
(
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