Merge pull request 'FIX WIP' (#192) from dev_trustie_server into trustie_server

This commit is contained in:
jasder 2021-10-14 18:13:26 +08:00
commit 5cbe83f9d4
2 changed files with 5 additions and 5 deletions

View File

@ -69,9 +69,9 @@ class PullRequestsController < ApplicationController
end
def edit
@fork_project_user_name = @project&.fork_project&.owner.try(:show_real_name)
@fork_project_user = @project&.fork_project&.owner.try(:login)
@fork_project_identifier = @project&.fork_project&.repository.try(:identifier)
@fork_project_user_name = @pull_request&.fork_project&.owner.try(:show_real_name)
@fork_project_user = @pull_request&.fork_project&.owner.try(:login)
@fork_project_identifier = @pull_request&.fork_project&.repository.try(:identifier)
end
def update

View File

@ -3,8 +3,8 @@ json.project_name @project.name
json.identifier @project.identifier
json.project_identifier @project.identifier
json.pr_time time_from_now(@pull_request.updated_at)
json.commits_count @pull_request.commits_count
json.files_count @pull_request.files_count
json.commits_count @gitea_pull["commit_num"]
json.files_count @gitea_pull["changed_files"]
json.comments_count @issue.journals.parent_journals.size
json.comments_total_count @issue.get_journals_size