mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-21 20:25:45 +08:00
新增:获取单个提交的blame信息接口以及文档
This commit is contained in:
40
app/views/api/v1/projects/commits/diff.json.jbuilder
Normal file
40
app/views/api/v1/projects/commits/diff.json.jbuilder
Normal file
@@ -0,0 +1,40 @@
|
||||
json.file_nums @result_object['NumFiles']
|
||||
json.total_addition @result_object['TotalAddition']
|
||||
json.total_deletion @result_object['TotalAddition']
|
||||
json.files @result_object['Files'].each do |file|
|
||||
json.name file['Name']
|
||||
json.oldname file['OldName']
|
||||
json.addition file['Addition']
|
||||
json.deletion file['Deletion']
|
||||
json.type file['Type']
|
||||
json.is_created file['IsCreated']
|
||||
json.is_deleted file['IsDeleted']
|
||||
json.is_bin file['IsBin']
|
||||
json.is_lfs_file file['IsLFSFile']
|
||||
json.is_renamed file['IsRenamed']
|
||||
json.is_ambiguous file['IsAmbiguous']
|
||||
json.is_submodule file['IsSubmodule']
|
||||
json.sections file['Sections'] do |section|
|
||||
json.file_name section['FileName']
|
||||
json.name section['Name']
|
||||
json.lines section['Lines'] do |line|
|
||||
json.left_index line['LeftIdx']
|
||||
json.right_index line['RightIdx']
|
||||
json.match line['Match']
|
||||
json.type line['Type']
|
||||
json.content line['Content']
|
||||
unless line['SectionInfo'].blank?
|
||||
json.section_path line['SectionInfo']['Path']
|
||||
json.section_last_left_index line['SectionInfo']['LastLeftIdx']
|
||||
json.section_last_right_index line['SectionInfo']['LastRightIdx']
|
||||
json.section_left_index line['SectionInfo']['LeftIdx']
|
||||
json.section_right_index line['SectionInfo']['RightIdx']
|
||||
json.section_left_hunk_size line['SectionInfo']['LeftHunkSize']
|
||||
json.section_right_hunk_size line['SectionInfo']['RightHunkSize']
|
||||
end
|
||||
end
|
||||
end
|
||||
json.is_incomplete file['IsIncomplete']
|
||||
json.is_incomplete_line_too_long file['IsIncompleteLineTooLong']
|
||||
json.is_protected file['IsProtected']
|
||||
end
|
||||
Reference in New Issue
Block a user