fix: pullrequest fork_project_user_name

This commit is contained in:
yystopf 2021-11-09 15:41:46 +08:00
parent f1f4867b8c
commit e316a60433
2 changed files with 2 additions and 1 deletions

View File

@ -21,7 +21,7 @@ json.issues do
json.fork_project_id pr&.fork_project_id json.fork_project_id pr&.fork_project_id
json.fork_project_identifier pr&.fork_project&.identifier json.fork_project_identifier pr&.fork_project&.identifier
json.fork_project_user pr&.fork_project&.owner.try(:login) json.fork_project_user pr&.fork_project&.owner.try(:login)
json.fork_project_user_name pr&.fork_project&.owner.try(:show_real_name)
json.id issue.id json.id issue.id
json.name issue.subject json.name issue.subject

View File

@ -12,6 +12,7 @@ json.pull_request do
json.extract! @pull_request, :id,:base, :head, :status,:fork_project_id, :is_original 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_staus @pull_request.status == 1 ? "merged" : (@pull_request.status == 2 ? "closed" : "open")
json.fork_project_user @pull_request&.fork_project&.owner.try(:login) json.fork_project_user @pull_request&.fork_project&.owner.try(:login)
json.fork_project_user_name @pull_request&.fork_project&.owner.try(:show_real_name)
json.create_user @pull_request&.user&.login json.create_user @pull_request&.user&.login
json.mergeable @gitea_pull["mergeable"] json.mergeable @gitea_pull["mergeable"]
json.state @gitea_pull["state"] json.state @gitea_pull["state"]