mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-22 04:35:45 +08:00
新增:标签列表和删除接口
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
if tag.present? && tag.is_a?(Hash)
|
||||
json.name tag['name']
|
||||
json.id tag['id']
|
||||
json.zipball_url render_zip_url(@owner, @repository, tag['name'])
|
||||
json.tarball_url render_tar_url(@owner, @repository, tag['name'])
|
||||
json.tagger do
|
||||
json.partial! 'commit_author', user: render_cache_commit_author(tag['tagger']), name: tag['tagger']['name']
|
||||
end
|
||||
json.time_ago time_from_now(tag['tagger']['date'].to_time)
|
||||
json.created_at_unix tag['tagger']['date'].to_time.to_i
|
||||
json.message tag['message']
|
||||
json.commit do
|
||||
json.sha tag['commit']['sha']
|
||||
json.message tag['commit']['message']
|
||||
json.time_ago time_from_now(tag['commit']['commiter']['date'].to_time)
|
||||
json.created_at_unix tag['commit']['commiter']['date'].to_time.to_i
|
||||
json.committer do
|
||||
json.partial! 'commit_author', user: render_cache_commit_author(tag['commit']['commiter']), name: tag['commit']['commiter']['name']
|
||||
end
|
||||
json.author do
|
||||
json.partial! 'commit_author', user: render_cache_commit_author(tag['commit']['author']), name: tag['commit']['author']['name']
|
||||
end
|
||||
end
|
||||
else
|
||||
json.name tag
|
||||
end
|
||||
4
app/views/api/v1/projects/tags/index.json.jbuilder
Normal file
4
app/views/api/v1/projects/tags/index.json.jbuilder
Normal file
@@ -0,0 +1,4 @@
|
||||
json.total_count @result_object[:total_data].to_i
|
||||
json.tags @result_object[:data].each do |tag|
|
||||
json.partial! "api/v1/projects/tags/simple_gitea_index_detail", tag: tag
|
||||
end
|
||||
Reference in New Issue
Block a user