json.total_count @total_count
json.gitlink_branch_name @branch&.gitlink_branch_name
json.external_type @branch&.sync_repository&.type
json.external_branch_name @branch&.external_branch_name
json.logs @reposync_branch_logs.each do |log|
  type = log['repo_name'].start_with?('gitee') ? 'gitee' : 'github'
  json.change_from log['sync_direct'] == "to_inter" ? type : 'gitlink'
  json.commit_id log['commit_id']
  json.sync_time log['update_at']
  json.log log['log']
  json.sync_status log['log'].include?("************ 分支同步完成 ************") ? 'success' : "failure"
end