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
iv
gitlab-ce
Commits
0a21731e
Commit
0a21731e
authored
Jan 05, 2016
by
Tomasz Maczukin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add ci fields in project create/update feature API
parent
f60bceb9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
4 deletions
+13
-4
lib/api/helpers.rb
lib/api/helpers.rb
+1
-1
lib/api/projects.rb
lib/api/projects.rb
+12
-3
No files found.
lib/api/helpers.rb
View file @
0a21731e
...
...
@@ -157,7 +157,7 @@ module API
def
attributes_for_keys
(
keys
,
custom_params
=
nil
)
attrs
=
{}
keys
.
each
do
|
key
|
if
params
[
key
].
present?
or
(
params
.
has_key?
(
key
)
and
params
[
key
]
==
false
)
if
params
[
key
].
present?
or
(
params
.
has_key?
(
key
)
and
(
params
[
key
].
empty?
or
params
[
key
]
==
false
)
)
attrs
[
key
]
=
params
[
key
]
end
end
...
...
lib/api/projects.rb
View file @
0a21731e
...
...
@@ -114,7 +114,10 @@ module API
:namespace_id
,
:public
,
:visibility_level
,
:import_url
]
:import_url
,
:build_allow_git_fetch
,
:build_timeout
,
:build_coverage_regex
]
attrs
=
map_public_to_visibility_level
(
attrs
)
@project
=
::
Projects
::
CreateService
.
new
(
current_user
,
attrs
).
execute
if
@project
.
saved?
...
...
@@ -159,7 +162,10 @@ module API
:shared_runners_enabled
,
:public
,
:visibility_level
,
:import_url
]
:import_url
,
:build_allow_git_fetch
,
:build_timeout
,
:build_coverage_regex
]
attrs
=
map_public_to_visibility_level
(
attrs
)
@project
=
::
Projects
::
CreateService
.
new
(
user
,
attrs
).
execute
if
@project
.
saved?
...
...
@@ -215,7 +221,10 @@ module API
:snippets_enabled
,
:shared_runners_enabled
,
:public
,
:visibility_level
]
:visibility_level
,
:build_allow_git_fetch
,
:build_timeout
,
:build_coverage_regex
]
attrs
=
map_public_to_visibility_level
(
attrs
)
authorize_admin_project
authorize!
:rename_project
,
user_project
if
attrs
[
:name
].
present?
...
...
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