change pr

This commit is contained in:
sylor_huang@126.com
2020-06-30 09:44:28 +08:00
parent d4962b5c75
commit 999006fba7
5 changed files with 30 additions and 11 deletions
+2 -1
View File
@@ -5,11 +5,12 @@ json.pr_time time_from_now(@pull_request.updated_at)
json.pull_request do
json.extract! @pull_request, :id,:base, :head, :status,:fork_project_id, :is_original
json.pull_request_staus @pull_request.status == 1 ? "merged" : (@pull_request.status == 2 ? "closed" : "open")
json.pull_request_user @pull_request.user.try(:show_real_name)
json.fork_project_user @pull_request&.fork_project&.owner.try(:login)
end
json.issue do
json.extract! @issue, :id,:subject,:description,:is_private, :branch_name
json.project_author_name @project.owner.try(:login)
json.user_permission @user_permission
json.closed_on @issue.closed_on.present? ? format_time(@issue.closed_on) : ""
json.created_at format_time(@issue.created_on)