mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-02 19:30:48 +08:00
add: project branch_slice
This commit is contained in:
20
app/views/projects/branches_slice.json.jbuilder
Normal file
20
app/views/projects/branches_slice.json.jbuilder
Normal file
@@ -0,0 +1,20 @@
|
||||
json.array! @branches_slice do |branch_slice|
|
||||
json.branch_type branch_slice['branch_name']
|
||||
json.list branch_slice['branches'].each do |branch|
|
||||
json.name branch['name']
|
||||
json.user_can_push branch['user_can_push']
|
||||
json.user_can_merge branch['user_can_merge']
|
||||
json.protected branch['protected']
|
||||
json.http_url render_http_url(@project)
|
||||
json.zip_url render_zip_url(@owner, @repository, branch['name'])
|
||||
json.tar_url render_tar_url(@owner, @repository, branch['name'])
|
||||
json.last_commit do
|
||||
json.sha branch['commit']['id']
|
||||
json.message branch['commit']['message']
|
||||
json.timestamp render_unix_time(branch['commit']['timestamp'])
|
||||
json.time_from_now time_from_now(branch['commit']['timestamp'])
|
||||
json.author branch['commit']['author']
|
||||
json.committer branch['commit']['committer']
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user