新增:标签名字列表

This commit is contained in:
yystopf 2022-10-18 13:32:57 +08:00
parent 35965f542a
commit e25231738a
1 changed files with 8 additions and 2 deletions

View File

@ -147,9 +147,15 @@ class RepositoriesController < ApplicationController
end
def tags
result = Gitea::Repository::Tags::ListService.call(current_user&.gitea_token, @owner.login, @project.identifier, {page: params[:page], limit: params[:limit]})
if params[:only_name].present?
result = Gitea::Repository::Tags::ListNameService.call(@owner, @project.identifier, params[:name])
@tags = result.is_a?(Hash) && result.key?(:status) ? [] : result
@tags = result.is_a?(Hash) && result.key?(:status) ? [] : result
else
result = Gitea::Repository::Tags::ListService.call(current_user&.gitea_token, @owner.login, @project.identifier, {page: params[:page], limit: params[:limit]})
@tags = result.is_a?(Hash) && result.key?(:status) ? [] : result
end
end
def contributors