mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-02 19:30:48 +08:00
新增: 合并请求文件变更列表拆解
This commit is contained in:
5
app/views/api/v1/projects/_simple_gitea_file.jbuilder
Normal file
5
app/views/api/v1/projects/_simple_gitea_file.jbuilder
Normal file
@@ -0,0 +1,5 @@
|
||||
json.filename file["filename"]
|
||||
json.status file["status"]
|
||||
json.additions file["additions"]
|
||||
json.deletions file["deletions"]
|
||||
json.changes file["changes"]
|
||||
@@ -0,0 +1,8 @@
|
||||
if params[:filepath].present?
|
||||
json.partial! "api/v1/projects/simple_gitea_diff_detail", diff: @result_object
|
||||
else
|
||||
json.file_numbers @result_object[:total_data]
|
||||
json.files @result_object[:data] do |file|
|
||||
json.partial! "api/v1/projects/simple_gitea_file", file: file
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user