Browse Source

fix: add comments_total_count

tags/v3.2.0
yystopf 4 years ago
parent
commit
a22327d0df
2 changed files with 3 additions and 2 deletions
  1. +1
    -1
      app/services/gitea/pull_request/files_service.rb
  2. +2
    -1
      app/views/pull_requests/show.json.jbuilder

+ 1
- 1
app/services/gitea/pull_request/files_service.rb View File

@@ -24,7 +24,7 @@ class Gitea::PullRequest::FilesService < Gitea::ClientService
def params
Hash.new.merge(token: token)
end
def url
"/repos/#{owner}/#{repo}/pulls/#{pull_number}/files".freeze
end


+ 2
- 1
app/views/pull_requests/show.json.jbuilder View File

@@ -5,7 +5,8 @@ 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.comments_count @issue.get_journals_size
json.comments_count @issue.journals.parent_journals.size
json.comments_total_count @issue.get_journals_size

json.pull_request do
json.extract! @pull_request, :id,:base, :head, :status,:fork_project_id, :is_original


Loading…
Cancel
Save