From 7067c7d19017d30bd8b5ac8e398f8728876c4bd9 Mon Sep 17 00:00:00 2001 From: yystopf Date: Thu, 29 May 2025 10:20:45 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=EF=BC=9A=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E5=81=A5=E5=BA=B7=E5=BA=A6=E4=BB=A3=E7=A0=81=E7=BB=B4=E5=BA=A6?= =?UTF-8?q?=E5=88=86=E6=AF=8D=E5=8F=98=E5=B0=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/api/v1/projects/portrait_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/api/v1/projects/portrait_controller.rb b/app/controllers/api/v1/projects/portrait_controller.rb index f37e30a2a..9cf3259bc 100644 --- a/app/controllers/api/v1/projects/portrait_controller.rb +++ b/app/controllers/api/v1/projects/portrait_controller.rb @@ -135,7 +135,7 @@ class Api::V1::Projects::PortraitController < Api::V1::BaseController pullrequest_count = PullRequest.where(project_id: @project.id).count issue_count = Issue.issue_issue.where(project_id: @project.id).count health_code1 = max_member_count.to_i == 0 ? 0 : 0.3*(member_count.to_f/max_member_count) - health_code2 = last_commit_day.to_i == 0 ? 0 : 0.7*(1.to_f/(1+last_commit_day)) + health_code2 = last_commit_day.to_i == 0 ? 0 : 0.7*(1.to_f/(1+last_commit_day*0.1)) health_code = 10 * (health_code1 + health_code2) health_license = 10 * has_license health_pullrequest = pullrequest_count <= 1 ? 0 : 40 * (closed_pullrequest_count.to_f/pullrequest_count)*(1-1/Math.sqrt(pullrequest_count+1))