Skip to content
Snippets Groups Projects
Commit be7a784d authored by Tomasz Maczukin's avatar Tomasz Maczukin
Browse files

Add some fixes after review

parent ac5b250f
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -2,7 +2,7 @@
 
## List merge requests
 
Get all merge requests for this project.
Get all merge requests for this project.
The `state` parameter can be used to get only merge requests with a given state (`opened`, `closed`, or `merged`) or all of them (`all`).
The pagination parameters `page` and `per_page` can be used to restrict the list of merge requests.
 
Loading
Loading
@@ -50,8 +50,7 @@ Parameters:
"created_at": "2012-04-29T08:46:00Z"
},
"description":"fixed login page css paddings",
"work_in_progress": false,
"status": "pending"
"work_in_progress": false
}
]
```
Loading
Loading
@@ -98,7 +97,25 @@ Parameters:
},
"description":"fixed login page css paddings",
"work_in_progress": false,
"status": "pending"
"last_commit": {
"author_email": "admin@example.com",
"author_name": "Administrator",
"authored_date": "2012-04-25T13:12:15.000+01:00",
"committed_date": "2012-04-25T13:12:15.000+01:00",
"coverage": null,
"created_at": "2012-04-25T13:12:15.000+01:00",
"duration": 0,
"finished_at": null,
"id": "6c14056df0be27374e849ad67295a22cd0f7e0d0",
"message": "Add some fixes",
"parent_ids": [
"6b053ad388c531c21907f022933e5e81598db388"
],
"short_id": "6c14056d",
"started_at": null,
"status": "pending",
"title": "Add some fixes"
}
}
```
 
Loading
Loading
@@ -206,8 +223,7 @@ Parameters:
"renamed_file": false,
"deleted_file": false
}
],
"status": "pending"
]
}
```
 
Loading
Loading
@@ -255,8 +271,7 @@ Parameters:
"state": "active",
"created_at": "2012-04-29T08:46:00Z"
},
"description":"fixed login page css paddings",
"status": "pending"
"description":"fixed login page css paddings"
}
```
 
Loading
Loading
@@ -307,8 +322,7 @@ Parameters:
"name": "Administrator",
"state": "active",
"created_at": "2012-04-29T08:46:00Z"
},
"status": "pending"
}
}
```
 
Loading
Loading
@@ -364,8 +378,7 @@ Parameters:
"name": "Administrator",
"state": "active",
"created_at": "2012-04-29T08:46:00Z"
},
"status": "pending"
}
}
```
 
Loading
Loading
Loading
Loading
@@ -165,12 +165,6 @@ module API
expose :assignee, :author, using: Entities::UserBasic
end
 
class CommitStatus < Grape::Entity
expose :id, :sha, :ref, :status, :name, :target_url, :description,
:created_at, :started_at, :finished_at, :allow_failure
expose :author, using: Entities::UserBasic
end
class MergeRequest < ProjectEntity
expose :target_branch, :source_branch
expose :upvotes, :downvotes
Loading
Loading
@@ -181,11 +175,10 @@ module API
expose :work_in_progress?, as: :work_in_progress
expose :milestone, using: Entities::Milestone
expose :merge_when_build_succeeds
expose :status do |repo_obj, _options|
if repo_obj.respond_to?(:ci_commit)
repo_obj.ci_commit.status if repo_obj.ci_commit
end
end
end
class MergeRequestDetail < MergeRequest
expose :last_commit, with: RepoCommitDetail
end
 
class MergeRequestChanges < MergeRequest
Loading
Loading
@@ -229,6 +222,12 @@ module API
expose :created_at
end
 
class CommitStatus < Grape::Entity
expose :id, :sha, :ref, :status, :name, :target_url, :description,
:created_at, :started_at, :finished_at, :allow_failure
expose :author, using: Entities::UserBasic
end
class Event < Grape::Entity
expose :title, :project_id, :action_name
expose :target_id, :target_type, :author_id
Loading
Loading
Loading
Loading
@@ -73,7 +73,7 @@ module API
 
authorize! :read_merge_request, merge_request
 
present merge_request, with: Entities::MergeRequest
present merge_request, with: Entities::MergeRequestDetail
end
 
# Show MR commits
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment