github-analytics-scoring

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

GitHub Analytics Scoring

GitHub分析评分体系

Repository Health Score

仓库健康度评分

text
Health Score = 100 - (sum of weighted penalties)

Penalties - CI & Reliability:
  Failing workflow, high confidence:         -10 points
  Flaky test (3+ failures/week):             - 5 points
  No CI configured:                          - 8 points

Penalties - Issues & PRs:
  Critical unresolved bug (P0):             -10 points
  Security alert (critical severity):       -10 points
  Security alert (high severity):           - 5 points
  PR open >14 days (stale):                 - 3 points each (max -9)
  Issue @mentioned, no response >7 days:    - 5 points each (max -10)
  >10 open issues with no labels/triage:    - 3 points

Penalties - Community Health:
  No CONTRIBUTING.md:                        - 5 points
  No CODE_OF_CONDUCT.md:                     - 3 points
  No branch protection on main:              - 5 points
  0 open "good first issue" labels:          - 2 points

Floor: 0 (minimum score)
text
Health Score = 100 - (sum of weighted penalties)

Penalties - CI & Reliability:
  Failing workflow, high confidence:         -10 points
  Flaky test (3+ failures/week):             - 5 points
  No CI configured:                          - 8 points

Penalties - Issues & PRs:
  Critical unresolved bug (P0):             -10 points
  Security alert (critical severity):       -10 points
  Security alert (high severity):           - 5 points
  PR open >14 days (stale):                 - 3 points each (max -9)
  Issue @mentioned, no response >7 days:    - 5 points each (max -10)
  >10 open issues with no labels/triage:    - 3 points

Penalties - Community Health:
  No CONTRIBUTING.md:                        - 5 points
  No CODE_OF_CONDUCT.md:                     - 3 points
  No branch protection on main:              - 5 points
  0 open "good first issue" labels:          - 2 points

Floor: 0 (minimum score)

Score Grades

评分等级

ScoreGradeMeaning
90-100AExcellent - healthy repo, minimal issues
75-89BGood - minor issues, well-managed
50-74CNeeds attention - multiple signals requiring action
25-49DPoor - significant problems impacting velocity
0-24FCritical - major issues blocking team progress

分数等级含义
90-100A优秀 - 仓库健康,问题极少
75-89B良好 - 存在少量问题,管理规范
50-74C需关注 - 存在多个需要处理的问题信号
25-49D较差 - 存在显著问题影响交付速度
0-24F危急 - 存在重大问题阻塞团队进度

Priority Scoring for Issues

Issue优先级评分

Internally score each issue to determine sort order in dashboards and reports:
SignalPoints
User @mentioned and hasn't responded+5
P0
,
P1
,
critical
,
urgent
,
blocker
label
+3
Tied to upcoming release milestone+3
New comments from others since user's last activity+2
High community interest (5+ positive reactions)+2
bug
label
+1
Assigned to user+1
Active related discussion thread+1
wontfix
,
duplicate
,
question
label
-1
No activity >14 days-2
为每个Issue内部打分,用于确定看板和报告中的排序顺序:
评分项分值
用户被@但尚未回复+5
带有
P0
P1
critical
urgent
blocker
标签
+3
关联即将发布的里程碑+3
用户上次活跃后有其他用户新增评论+2
社区关注度高(5+正面反应)+2
带有
bug
标签
+1
已分配给用户+1
存在相关活跃讨论线程+1
带有
wontfix
duplicate
question
标签
-1
超过14天无活动-2

Priority Scoring for Pull Requests

PR优先级评分

SignalPoints
Review requested, user hasn't reviewed+5
PR has "changes requested" - author needs to update+4
PR is approved and ready to merge+3
Targets a release branch with upcoming deadline+3
CI failed on this PR+2
Merge conflicts present+2
High community interest (5+ positive reactions)+2
New comments on the PR+1
Active discussion thread linked to this PR+1
Draft PR-1
No activity >7 days-2
评分项分值
已请求 review 但用户尚未评审+5
PR 收到「需要修改」反馈,作者需要更新+4
PR 已通过审核可合并+3
目标为即将截止的发布分支+3
本次PR的CI运行失败+2
存在合并冲突+2
社区关注度高(5+正面反应)+2
PR有新增评论+1
关联了活跃讨论线程+1
草稿PR-1
超过7天无活动-2

Priority Scoring for Discussions

讨论优先级评分

SignalPoints
User was @mentioned+3
High activity (10+ comments in 24h)+2
Linked to an issue/PR the user owns+1
No activity >7 days-1

评分项分值
用户被@+3
活跃度高(24小时内10+评论)+2
关联用户负责的Issue/PR+1
超过7天无活动-1

Confidence Levels for Analytics Findings

分析结论置信度等级

Apply confidence levels to all bottleneck findings, health score deductions, and anomaly detections. Every finding in a report MUST include its confidence level.
LevelWhen to UseImpact on Report
HighMultiple corroborating signals, definitively observed (e.g., CI has failed 5 times this week, confirmed by logs)Report as fact; recommend remediation
MediumFound by one source, likely issue (e.g., PR open 14 days but author may be on leave)Report as finding; suggest investigation
LowPossible pattern, needs human review (e.g., velocity seems low but may be seasonal)Flag as observation; don't deduct from score
所有瓶颈检测结论、健康度扣分、异常检测结果都需要标注置信度等级,报告中的所有结论必须包含其置信度等级。
等级适用场景对报告的影响
多个相互印证的信号,可明确观测到(如CI本周失败5次,可通过日志确认)作为事实报告,建议修复
单一来源检测到,大概率存在问题(如PR开放14天但作者可能在休假)作为发现项报告,建议调查
可能存在的模式,需要人工复核(如交付速度看起来低但可能是季节性影响)作为观测项标记,不扣除分数

Confidence Tag Format in Reports

报告中的置信度标签格式

markdown
| Finding | Severity | Confidence | Recommendation |
|---------|----------|-----------|----------------|
| 3 PRs stale >14 days | High | **High** | Assign reviewers or close |
| Velocity 40% below 4-week avg | Medium | **Medium** | Verify - may be holiday period |
| Issue activity spike on Fridays | Low | **Low** | Monitor for 2 weeks before acting |

markdown
| 发现项 | 严重程度 | 置信度 | 建议 |
|---------|----------|-----------|----------------|
| 3个PR已闲置超过14天 || **** | 分配评审者或关闭 |
| 交付速度比4周平均值低40% || **** | 核实 - 可能是假期影响 |
| 周五Issue活动量激增 || **** | 监控2周后再采取行动 |

Delta Tracking

变化跟踪

When re-running an analysis against a previous report, classify every finding by change status:
StatusDefinition
FixedWas in previous report; no longer present
NewNot in previous report; appears now
PersistentRemains from previous report, unchanged
RegressedWas previously fixed but has returned
将本次分析结果与上一份报告对比时,按变化状态对所有发现项分类:
状态定义
已修复上一份报告中存在,当前已不存在
新增上一份报告中不存在,本次新出现
持续存在上一份报告中存在,当前无变化
回归之前已修复,当前再次出现

Delta Report Section Format

变化报告章节格式

markdown
undefined
markdown
undefined

Changes Since Last Report ({previous date})

上次报告({previous date})以来的变化

ChangeFindingDetails
Fixed3 stale PRs resolvedTeam cleared the backlog
NewCI failing on mainBuild broke in last 24h
Persistent (#3)Velocity 30% below baselineThird consecutive week
RegressedSecurity alert reopenedlodash advisory re-filed
Progress: {N} fixed, {M} new, {P} persistent, {Q} regressed Score change: {current_score} ({+/-N} from {previous_score})
undefined
变化类型发现项详情
已修复3个闲置PR已处理团队清理了待办队列
新增主分支CI运行失败过去24小时内构建故障
持续存在(第3次)交付速度比基准低30%连续第三周出现
回归安全警报重新开启lodash漏洞 advisory 重新提交
进度: {N} 个已修复,{M} 个新增,{P} 个持续存在,{Q} 个回归 分数变化: {current_score}(较上次{previous_score}变化{+/-N})
undefined

Escalation Rule

升级规则

If a finding is Persistent for 3+ consecutive reports, escalate:
Escalation: [{Finding}] has been present for {N} consecutive reports. Consider a team discussion or explicit ownership assignment to resolve this.

如果一个发现项连续3份及以上报告持续存在,触发升级:
升级提示: [{发现项}] 已连续 {N} 份报告存在。建议组织团队讨论或明确分配负责人解决该问题。

Velocity Metrics

交付速度指标

MetricFormulaHealthyWarningCritical
PR merge ratePRs merged / week>3/week1-3/week<1/week
Issue close rateIssues closed / week>5/week2-5/week<2/week
Review turnaroundAvg hours PR open before first review<24h24-72h>72h
Issue response timeAvg hours until first team response<8h8-48h>48h
Stale PR ratioPRs open >14 days / total open PRs<10%10-30%>30%
CI reliabilityPassing runs / total runs (7-day)>95%80-95%<80%

指标计算公式健康值预警值临界值
PR合并率每周合并PR数量>3/周1-3/周<1/周
Issue关闭率每周关闭Issue数量>5/周2-5/周<2/周
评审响应时长PR开启后到首次评审的平均小时数<24h24-72h>72h
Issue响应时长团队首次回复的平均小时数<8h8-48h>48h
闲置PR占比开放超过14天的PR / 总开放PR数<10%10-30%>30%
CI可靠性7天内CI成功运行次数 / 总运行次数>95%80-95%<80%

Contributor Metrics

贡献者指标

MetricFormulaNotes
PR commit ratioCommits / PRs mergedHigh ratio = large PRs, consider splitting
Review coveragePRs reviewed by others / total PRs mergedLow = single-contributor bottleneck
First-time contributor rateNew contributors / total active contributorsHealthy community growth signal
Contributor retentionActive last month AND active this month / active last monthEngagement health
Bus factorMin contributors whose departure halts 50%+ of commits<3 is high risk

指标计算公式说明
PR提交比率提交数 / 合并PR数比率高说明PR体积大,建议拆分
评审覆盖率被他人评审过的PR / 总合并PR数占比低说明存在单人贡献瓶颈
首次贡献者占比新贡献者 / 总活跃贡献者社区健康增长的信号
贡献者留存率上月活跃且本月仍活跃的贡献者 / 上月活跃贡献者参与度健康度指标
巴士因子最少需要多少名贡献者离职就会导致50%以上提交停滞<3属于高风险

Bottleneck Categories

瓶颈分类

CategorySignalsExample Finding
Review bottleneckHigh PR open time, review-requested PRs >3 days"4 PRs waiting for review >3 days - assign or redistribute"
CI bottleneckFrequent failures, long runtimes"Test suite 45min avg - 2x slower than 4-week average"
Stale workIssues/PRs with no activity >14 days"7 issues open >30 days with no recent comments"
Knowledge concentration80%+ commits from one contributor"3 of 4 core modules have only one contributor - bus factor 1"
Response lag>24h average first response to new issues"Average first response: 38h - community may feel unsupported"
Security debtOpen Dependabot alerts unresolved >7 days"2 critical alerts open for 12 days"
Release congestion>10 merged PRs unreleased"11 merged PRs awaiting release - coordinate cut date"

分类判断信号示例结论
评审瓶颈PR开放时间长,请求评审的PR超过3天未处理"4个PR等待评审超过3天 - 分配评审任务或重新分配工作量"
CI瓶颈频繁失败,运行时间长"测试套件平均运行时间45分钟 - 比4周平均值慢2倍"
工作闲置Issue/PR超过14天无活动"7个Issue开放超过30天无最新评论"
知识集中80%以上提交来自同一名贡献者"4个核心模块中有3个仅1名贡献者 - 巴士因子为1"
响应滞后新Issue平均首次回复超过24小时"平均首次回复时长:38小时 - 社区可能感到不受支持"
安全债务开放的Dependabot警报超过7天未处理"2个严重警报已开放12天"
发布拥堵超过10个已合并PR未发布"11个已合并PR等待发布 - 协调发布时间节点"

Trend Classification

趋势分类

TrendDefinition
ImprovingScore increased 5+ points vs previous report
StableScore within 5 points of previous report
DecliningScore decreased 5+ points vs previous report
RecoveringScore increased after 2+ consecutive Declining reports
NewNo previous report to compare

趋势定义
改善分数较上一份报告上涨5分及以上
稳定分数较上一份报告波动在5分以内
下降分数较上一份报告下跌5分及以上
恢复连续2份及以上报告下降后分数上涨
新增无上一份报告可对比

Scorecard Output Format

记分卡输出格式

Single Repo

单仓库

markdown
undefined
markdown
undefined

Repository Health Score

仓库健康度评分

MetricValue
Repoowner/repo
Score{0-100}
Grade{A-F}
Trend{Improving / Stable / Declining}
Open Security Alerts{count}
Stale PRs (>14 days){count}
CI Reliability (7-day){%}
Unanswered @mentions{count}
undefined
指标数值
仓库owner/repo
分数{0-100}
等级{A-F}
趋势{改善 / 稳定 / 下降}
未处理安全警报{count}
闲置PR(>14天){count}
CI可靠性(7天){%}
未回复@提及{count}
undefined

Multi-Repo Scorecard

多仓库记分卡

markdown
undefined
markdown
undefined

Repository Health Scorecard

仓库健康度记分卡

RepoScoreGradeTrendCritical IssuesNotes
owner/repo-a88BImproving0
owner/repo-b54CDeclining1Security alert unresolved
owner/repo-c22FStable3Review bottleneck + stale PRs
Average54.7C-4

---
仓库分数等级趋势严重问题备注
owner/repo-a88B改善0
owner/repo-b54C下降1安全警报未处理
owner/repo-c22F稳定3评审瓶颈+闲置PR
平均值54.7C-4

---

Sprint & Iteration Metrics

冲刺与迭代指标

When project boards are configured, track sprint metrics:
MetricFormula
Sprint completion rateDone items / total sprint items x 100
Carryover rateItems moved to next sprint / planned items
Cycle timeAverage days from "In Progress" to "Done"
ThroughputItems completed per sprint
Blocked rateItems in "Blocked" state / total in-progress
当配置了项目看板时,跟踪冲刺指标:
指标计算公式
冲刺完成率完成项 / 总冲刺项 x 100
遗留率移入下一个冲刺的项 / 计划项
周期时间从「进行中」到「完成」的平均天数
吞吐量每个冲刺完成的项数
阻塞率「阻塞」状态的项 / 总进行中项数