新增:恢复分支接口

新增:删除者信息
This commit is contained in:
2023-12-26 08:41:39 +08:00
parent c94bffd844
commit d8eeb8f1b7
5 changed files with 69 additions and 3 deletions

View File

@@ -23,4 +23,14 @@ json.commit_time branch['commit']['timestamp']
json.default_branch default_branch || nil
json.http_url render_http_url(@project)
json.zip_url render_zip_url(@owner, @project.repository, branch['name'])
json.tar_url render_tar_url(@owner, @project.repository, branch['name'])
json.tar_url render_tar_url(@owner, @project.repository, branch['name'])
json.branch_id branch['id']
json.is_deleted branch['is_deleted']
json.deleted_unix branch['deleted_unix']
json.deleted_by do
if branch['is_deleted']
json.partial! 'api/v1/users/commit_user', locals: { user: render_cache_commit_author(branch['deleted_by']), name: branch['deleted_by']['name'] }
else
json.nil!
end
end