if params[:filepath].present? 
  json.partial! "api/v1/projects/simple_gitea_diff_detail", diff: @compare_result['Diff']
else
  json.file_nums @compare_result[:total_data].to_i
  json.total_addition @compare_result[:data]["total_addition"]
  json.total_deletion @compare_result[:data]["total_deletion"]
  json.files @compare_result[:data]["files"] do |file|
    json.partial! "api/v1/projects/simple_gitea_file", file: file
  end
end
json.status @merge_status
json.message @merge_message