diff --git a/app/controllers/api/v1/projects/code_stats_controller.rb b/app/controllers/api/v1/projects/code_stats_controller.rb index 7ec671f3c..0f2b2dd36 100644 --- a/app/controllers/api/v1/projects/code_stats_controller.rb +++ b/app/controllers/api/v1/projects/code_stats_controller.rb @@ -3,6 +3,6 @@ class Api::V1::Projects::CodeStatsController < Api::V1::BaseController def index @result_object = Api::V1::Projects::CodeStats::ListService.call(@project, {ref: params[:ref]}, current_user&.gitea_token) - puts @result_object + # puts @result_object end end \ No newline at end of file diff --git a/app/helpers/projects_helper.rb b/app/helpers/projects_helper.rb index 738463f22..2728b7546 100644 --- a/app/helpers/projects_helper.rb +++ b/app/helpers/projects_helper.rb @@ -66,9 +66,6 @@ module ProjectsHelper jianmu_devops: jianmu_devops_code(project, user), jianmu_devops_url: jianmu_devops_url, cloud_ide_saas_url: cloud_ide_saas_url(user), - ai_shang_v1_url: ai_shang_v1_url(project), - ai_shang_v2_url: ai_shang_v2_url(project), - ai_shang_v3_url: ai_shang_v3_url(project), ignore_id: project.ignore_id }).compact diff --git a/app/views/api/v1/projects/code_stats/index.json.jbuilder b/app/views/api/v1/projects/code_stats/index.json.jbuilder index 0b64270f7..c41fbc1ba 100644 --- a/app/views/api/v1/projects/code_stats/index.json.jbuilder +++ b/app/views/api/v1/projects/code_stats/index.json.jbuilder @@ -4,11 +4,14 @@ json.change_files @result_object["change_files"] json.additions @result_object["additions"] json.deletions @result_object["deletions"] json.commit_count_in_all_branches @result_object["commit_count_in_all_branches"] -json.authors @result_object["authors"].each do |author| +json.authors @result_object["authors"].each do |author| json.author do json.partial! 'api/v1/users/commit_user_email', locals: { user: render_cache_commit_author(author), name: author['name'], email: author['email'] } end json.commits author["commits"] json.additions author["additions"] json.deletions author["deletions"] -end \ No newline at end of file +end +json.ai_shang_v1_url ai_shang_v1_url(@project) +json.ai_shang_v2_url ai_shang_v2_url(@project) +json.ai_shang_v3_url ai_shang_v3_url(@project) \ No newline at end of file