BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
7ed08fcd
Commit
7ed08fcd
authored
Jan 10, 2018
by
Tony Rom
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix style
parent
fd88b0ca
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
4 deletions
+9
-4
merge_requests.md
doc/api/merge_requests.md
+0
-2
merge_requests.rb
lib/api/merge_requests.rb
+3
-2
merge_requests_spec.rb
spec/requests/api/merge_requests_spec.rb
+6
-0
No files found.
doc/api/merge_requests.md
View file @
7ed08fcd
...
...
@@ -444,8 +444,6 @@ Parameters:
-
`id`
(required) - The ID or
[
URL-encoded path of the project
](
README.md#namespaced-path-encoding
)
owned by the authenticated user
-
`merge_request_iid`
(required) - The internal ID of the merge request
Example of response
```
json
[
{
...
...
lib/api/merge_requests.rb
View file @
7ed08fcd
...
...
@@ -24,8 +24,9 @@ module API
.
preload
(
:notes
,
:author
,
:assignee
,
:milestone
,
:latest_merge_request_diff
,
:labels
,
:timelogs
)
end
def
merge_request_pipelines_with_access
(
access_level
=
:read_pipeline
)
authorize!
access_level
,
user_project
def
merge_request_pipelines_with_access
authorize!
:read_pipeline
,
user_project
mr
=
find_merge_request_with_access
(
params
[
:merge_request_iid
])
mr
.
all_pipelines
end
...
...
spec/requests/api/merge_requests_spec.rb
View file @
7ed08fcd
...
...
@@ -546,6 +546,12 @@ describe API::MergeRequests do
expect
(
response
).
to
have_gitlab_http_status
(
200
)
expect
(
response
).
to
match_response_schema
(
'public_api/v4/pipelines'
)
end
it
'returns 404 if MR does not exist'
do
get
api
(
"/projects/
#{
project
.
id
}
/merge_requests/777/pipelines"
)
expect
(
response
).
to
have_gitlab_http_status
(
404
)
end
end
context
'when unauthorized'
do
...
...
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