2013-06-18 20:45:40 +01:00
|
|
|
json.number pull.serial_id
|
|
|
|
json.(pull, :title, :status)
|
2013-07-17 13:35:36 +01:00
|
|
|
json.to_ref do
|
|
|
|
json.ref pull.to_ref
|
2013-07-19 18:08:00 +01:00
|
|
|
json.sha pull.to_commit.try(:id)
|
2013-07-17 13:35:36 +01:00
|
|
|
json.project do
|
2014-01-21 04:51:49 +00:00
|
|
|
json.partial! 'api/v1/projects/project', project: pull.to_project
|
2013-06-18 20:45:40 +01:00
|
|
|
end
|
|
|
|
end
|
2013-07-17 13:35:36 +01:00
|
|
|
json.from_ref do
|
|
|
|
json.ref pull.from_ref
|
2013-07-19 18:08:00 +01:00
|
|
|
json.sha pull.from_commit.try(:id)
|
2013-07-17 13:35:36 +01:00
|
|
|
json.project do
|
2014-01-21 04:51:49 +00:00
|
|
|
json.partial! 'api/v1/projects/project', project: pull.from_project
|
2013-06-18 20:45:40 +01:00
|
|
|
end
|
|
|
|
end
|
2014-01-21 04:51:49 +00:00
|
|
|
json.partial! 'api/v1/shared/owner', owner: pull.user
|
2013-07-17 13:35:36 +01:00
|
|
|
json.assignee do
|
2014-01-21 04:51:49 +00:00
|
|
|
json.partial! 'api/v1/shared/member', member: pull.issue.assignee
|
2013-06-18 20:45:40 +01:00
|
|
|
end if pull.issue.assignee
|
|
|
|
json.mergeable pull.can_merging?
|
|
|
|
json.merged_at pull.issue.closed_at.to_i if pull.merged?
|
|
|
|
|
2014-01-21 04:51:49 +00:00
|
|
|
json.url api_v1_project_pull_request_path(pull.to_project.id, pull.id, format: :json)
|