json.(pull, :id, :title, :body, :head, :base, :is_original)
json.index pull.gitea_number
json.status pull.status == 1 ? "merged" : (pull.status == 2 ? "closed" : "open")

fork_project = pull&.fork_project
if fork_project.present?
  json.fork_project do 
    json.(fork_project, :id, :identifier)
    json.login fork_project&.owner&.login
  end
end

issue = pull&.issue
json.issue do 
  json.id issue&.id
  json.author do 
    json.partial! '/api/v1/users/simple_user', user: issue&.user
  end
  json.priority issue&.priority.try(:name)
  json.version issue&.version.try(:name)
  json.journals_count issue.journals.count 
  json.issue_tags issue.get_issue_tags
end

json.reviewers pull.reviewers.pluck(:login)
json.journals_count pull.journals.count
json.pr_created_unix pull.created_at.to_i