修改repositories的tags_count数量

This commit is contained in:
sylor_huang@126.com 2020-05-21 18:01:39 +08:00
parent 0c01e114bf
commit cdc913328a
2 changed files with 2 additions and 2 deletions

View File

@ -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?

View File

@ -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