json.total_count @pull_requests.total_count
json.pull_requests @pull_requests.map do |pull_request|
  json.extract! pull_request, :id, :title, :body, :head, :base, :is_original, :fork_project_id, :created_at, :updated_at, :gitea_number
  if pull_request.project.blank?
    json.project nil
  else
    json.project do
      json.partial! "api/v1/projects/detail", project: pull_request.project
    end
  end
end