From cdc913328a97ebf4e96d3902b253afcf0cc52537 Mon Sep 17 00:00:00 2001 From: "sylor_huang@126.com" Date: Thu, 21 May 2020 18:01:39 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9repositories=E7=9A=84tags=5Fc?= =?UTF-8?q?ount=E6=95=B0=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/repositories_controller.rb | 2 +- app/views/repositories/show.json.jbuilder | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/repositories_controller.rb b/app/controllers/repositories_controller.rb index b8392c13a..354a0bc78 100644 --- a/app/controllers/repositories_controller.rb +++ b/app/controllers/repositories_controller.rb @@ -10,7 +10,7 @@ class RepositoriesController < ApplicationController def show @branches_count = Gitea::Repository::BranchesService.new(@project.owner, @project.identifier).call&.size @commits_count = Gitea::Repository::Commits::ListService.new(@project.owner, @project.identifier).call[:total_count] - @tags_count = Gitea::Repository::Tags::ListService.new(current_user&.gitea_token, @repo.user.login, @repo.identifier).call&.size + @tags_count = Gitea::Repository::Tags::ListService.new(current_user&.gitea_token, @project.owner.login, @project.identifier).call&.size @result = Gitea::Repository::GetService.new(@project.owner, @project.identifier).call @project_fork_id = @project.try(:forked_from_project_id) if @project_fork_id.present? diff --git a/app/views/repositories/show.json.jbuilder b/app/views/repositories/show.json.jbuilder index bf2aa1e7c..356a024f4 100644 --- a/app/views/repositories/show.json.jbuilder +++ b/app/views/repositories/show.json.jbuilder @@ -12,7 +12,7 @@ json.versions_count @project.versions_count #里程碑数量 json.version_releases_count @project.releases_size(current_user.try(:id), "all") json.version_releasesed_count @project.releases_size(current_user.try(:id), "released") #已发行的版本 json.contributor_users_count @project.contributor_users -json.issue_tags_count 0 +json.issue_tags_count @tags_count json.branches_count @branches_count json.commits_count @commits_count json.permission render_edit_project_permission(current_user, @project) if current_user