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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
9197028c
Commit
9197028c
authored
Feb 09, 2017
by
Oswaldo Ferreira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Re-add removed params from V3 project API
parent
6c48d4ec
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
1 deletion
+16
-1
lib/api/v3/projects.rb
lib/api/v3/projects.rb
+7
-1
spec/requests/api/v3/projects_spec.rb
spec/requests/api/v3/projects_spec.rb
+9
-0
No files found.
lib/api/v3/projects.rb
View file @
9197028c
...
@@ -25,6 +25,10 @@ module API
...
@@ -25,6 +25,10 @@ module API
optional
:request_access_enabled
,
type:
Boolean
,
desc:
'Allow users to request member access'
optional
:request_access_enabled
,
type:
Boolean
,
desc:
'Allow users to request member access'
optional
:only_allow_merge_if_build_succeeds
,
type:
Boolean
,
desc:
'Only allow to merge if builds succeed'
optional
:only_allow_merge_if_build_succeeds
,
type:
Boolean
,
desc:
'Only allow to merge if builds succeed'
optional
:only_allow_merge_if_all_discussions_are_resolved
,
type:
Boolean
,
desc:
'Only allow to merge if all discussions are resolved'
optional
:only_allow_merge_if_all_discussions_are_resolved
,
type:
Boolean
,
desc:
'Only allow to merge if all discussions are resolved'
# EE-specific
optional
:repository_storage
,
type:
String
,
desc:
'Which storage shard the repository is on. Available only to admins'
optional
:approvals_before_merge
,
type:
Integer
,
desc:
'How many approvers should approve merge request by default'
end
end
def
map_public_to_visibility_level
(
attrs
)
def
map_public_to_visibility_level
(
attrs
)
...
@@ -287,7 +291,9 @@ module API
...
@@ -287,7 +291,9 @@ module API
:lfs_enabled
,
:public
,
:visibility_level
,
:public_builds
,
:lfs_enabled
,
:public
,
:visibility_level
,
:public_builds
,
:request_access_enabled
,
:only_allow_merge_if_build_succeeds
,
:request_access_enabled
,
:only_allow_merge_if_build_succeeds
,
:only_allow_merge_if_all_discussions_are_resolved
,
:path
,
:only_allow_merge_if_all_discussions_are_resolved
,
:path
,
:default_branch
:default_branch
,
## EE-specific
:repository_storage
,
:approvals_before_merge
end
end
put
':id'
do
put
':id'
do
authorize_admin_project
authorize_admin_project
...
...
spec/requests/api/v3/projects_spec.rb
View file @
9197028c
...
@@ -1195,6 +1195,15 @@ describe API::V3::Projects, api: true do
...
@@ -1195,6 +1195,15 @@ describe API::V3::Projects, api: true do
expect
(
json_response
[
'request_access_enabled'
]).
to
eq
(
false
)
expect
(
json_response
[
'request_access_enabled'
]).
to
eq
(
false
)
end
end
it
'updates approvals_before_merge'
do
project_param
=
{
approvals_before_merge:
3
}
put
v3_api
(
"/projects/
#{
project
.
id
}
"
,
user
),
project_param
expect
(
response
).
to
have_http_status
(
200
)
expect
(
json_response
[
'approvals_before_merge'
]).
to
eq
(
3
)
end
it
'updates path & name to existing path & name in different namespace'
do
it
'updates path & name to existing path & name in different namespace'
do
project_param
=
{
path:
project4
.
path
,
name:
project4
.
name
}
project_param
=
{
path:
project4
.
path
,
name:
project4
.
name
}
put
v3_api
(
"/projects/
#{
project3
.
id
}
"
,
user
),
project_param
put
v3_api
(
"/projects/
#{
project3
.
id
}
"
,
user
),
project_param
...
...
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