Fix style
This commit is contained in:
parent
fd88b0ca56
commit
7ed08fcd5d
|
|
@ -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
|
||||
[
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue