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
e5a167e2
Commit
e5a167e2
authored
Mar 01, 2017
by
James Lopez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix other spec failures
parent
4f961f94
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
2 deletions
+8
-2
lib/api/v3/entities.rb
lib/api/v3/entities.rb
+6
-0
lib/api/v3/merge_requests.rb
lib/api/v3/merge_requests.rb
+1
-1
spec/requests/api/v3/projects_spec.rb
spec/requests/api/v3/projects_spec.rb
+1
-1
No files found.
lib/api/v3/entities.rb
View file @
e5a167e2
...
...
@@ -111,8 +111,10 @@ module API
::
API
::
Entities
::
SharedGroup
.
represent
(
project
.
project_group_links
.
all
,
options
)
end
expose
:only_allow_merge_if_pipeline_succeeds
,
as: :only_allow_merge_if_build_succeeds
expose
:repository_storage
,
if:
lambda
{
|
_project
,
options
|
options
[
:current_user
].
try
(
:admin?
)
}
expose
:request_access_enabled
expose
:only_allow_merge_if_all_discussions_are_resolved
expose
:approvals_before_merge
expose
:statistics
,
using:
'API::Entities::ProjectStatistics'
,
if: :statistics
end
...
...
@@ -147,12 +149,16 @@ module API
expose
:merge_status
expose
:diff_head_sha
,
as: :sha
expose
:merge_commit_sha
expose
:subscribed
do
|
merge_request
,
options
|
merge_request
.
subscribed?
(
options
[
:current_user
],
options
[
:project
])
end
expose
:user_notes_count
expose
:approvals_before_merge
expose
:should_remove_source_branch?
,
as: :should_remove_source_branch
expose
:force_remove_source_branch?
,
as: :force_remove_source_branch
expose
:squash
expose
:web_url
do
|
merge_request
,
options
|
Gitlab
::
UrlBuilder
.
build
(
merge_request
)
...
...
lib/api/v3/merge_requests.rb
View file @
e5a167e2
...
...
@@ -220,7 +220,7 @@ module API
present
merge_request
,
with:
::
API
::
V3
::
Entities
::
MergeRequest
,
current_user:
current_user
,
project:
user_project
end
desc
'Cancel merge if "Merge When Pipeline
s
ucceeds" is enabled'
do
desc
'Cancel merge if "Merge When Pipeline
S
ucceeds" is enabled'
do
success
::
API
::
V3
::
Entities
::
MergeRequest
end
post
"
#{
path
}
/cancel_merge_when_build_succeeds"
do
...
...
spec/requests/api/v3/projects_spec.rb
View file @
e5a167e2
...
...
@@ -639,7 +639,7 @@ describe API::V3::Projects, api: true do
expect
(
json_response
[
'shared_with_groups'
][
0
][
'group_id'
]).
to
eq
(
group
.
id
)
expect
(
json_response
[
'shared_with_groups'
][
0
][
'group_name'
]).
to
eq
(
group
.
name
)
expect
(
json_response
[
'shared_with_groups'
][
0
][
'group_access_level'
]).
to
eq
(
link
.
group_access
)
expect
(
json_response
[
'only_allow_merge_if_build_succeeds'
]).
to
eq
(
project
.
only_allow_merge_if_
build
_succeeds
)
expect
(
json_response
[
'only_allow_merge_if_build_succeeds'
]).
to
eq
(
project
.
only_allow_merge_if_
pipeline
_succeeds
)
expect
(
json_response
[
'only_allow_merge_if_all_discussions_are_resolved'
]).
to
eq
(
project
.
only_allow_merge_if_all_discussions_are_resolved
)
expect
(
json_response
[
'repository_storage'
]).
to
eq
(
project
.
repository_storage
)
end
...
...
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