github-analytics-scoring
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseGitHub 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
评分等级
| Score | Grade | Meaning |
|---|---|---|
| 90-100 | A | Excellent - healthy repo, minimal issues |
| 75-89 | B | Good - minor issues, well-managed |
| 50-74 | C | Needs attention - multiple signals requiring action |
| 25-49 | D | Poor - significant problems impacting velocity |
| 0-24 | F | Critical - major issues blocking team progress |
| 分数 | 等级 | 含义 |
|---|---|---|
| 90-100 | A | 优秀 - 仓库健康,问题极少 |
| 75-89 | B | 良好 - 存在少量问题,管理规范 |
| 50-74 | C | 需关注 - 存在多个需要处理的问题信号 |
| 25-49 | D | 较差 - 存在显著问题影响交付速度 |
| 0-24 | F | 危急 - 存在重大问题阻塞团队进度 |
Priority Scoring for Issues
Issue优先级评分
Internally score each issue to determine sort order in dashboards and reports:
| Signal | Points |
|---|---|
| User @mentioned and hasn't responded | +5 |
| +3 |
| Tied to upcoming release milestone | +3 |
| New comments from others since user's last activity | +2 |
| High community interest (5+ positive reactions) | +2 |
| +1 |
| Assigned to user | +1 |
| Active related discussion thread | +1 |
| -1 |
| No activity >14 days | -2 |
为每个Issue内部打分,用于确定看板和报告中的排序顺序:
| 评分项 | 分值 |
|---|---|
| 用户被@但尚未回复 | +5 |
带有 | +3 |
| 关联即将发布的里程碑 | +3 |
| 用户上次活跃后有其他用户新增评论 | +2 |
| 社区关注度高(5+正面反应) | +2 |
带有 | +1 |
| 已分配给用户 | +1 |
| 存在相关活跃讨论线程 | +1 |
带有 | -1 |
| 超过14天无活动 | -2 |
Priority Scoring for Pull Requests
PR优先级评分
| Signal | Points |
|---|---|
| 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
讨论优先级评分
| Signal | Points |
|---|---|
| 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.
| Level | When to Use | Impact on Report |
|---|---|---|
| High | Multiple corroborating signals, definitively observed (e.g., CI has failed 5 times this week, confirmed by logs) | Report as fact; recommend remediation |
| Medium | Found by one source, likely issue (e.g., PR open 14 days but author may be on leave) | Report as finding; suggest investigation |
| Low | Possible 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:
| Status | Definition |
|---|---|
| Fixed | Was in previous report; no longer present |
| New | Not in previous report; appears now |
| Persistent | Remains from previous report, unchanged |
| Regressed | Was previously fixed but has returned |
将本次分析结果与上一份报告对比时,按变化状态对所有发现项分类:
| 状态 | 定义 |
|---|---|
| 已修复 | 上一份报告中存在,当前已不存在 |
| 新增 | 上一份报告中不存在,本次新出现 |
| 持续存在 | 上一份报告中存在,当前无变化 |
| 回归 | 之前已修复,当前再次出现 |
Delta Report Section Format
变化报告章节格式
markdown
undefinedmarkdown
undefinedChanges Since Last Report ({previous date})
上次报告({previous date})以来的变化
| Change | Finding | Details |
|---|---|---|
| Fixed | 3 stale PRs resolved | Team cleared the backlog |
| New | CI failing on main | Build broke in last 24h |
| Persistent (#3) | Velocity 30% below baseline | Third consecutive week |
| Regressed | Security alert reopened | lodash 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})
undefinedEscalation 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
交付速度指标
| Metric | Formula | Healthy | Warning | Critical |
|---|---|---|---|---|
| PR merge rate | PRs merged / week | >3/week | 1-3/week | <1/week |
| Issue close rate | Issues closed / week | >5/week | 2-5/week | <2/week |
| Review turnaround | Avg hours PR open before first review | <24h | 24-72h | >72h |
| Issue response time | Avg hours until first team response | <8h | 8-48h | >48h |
| Stale PR ratio | PRs open >14 days / total open PRs | <10% | 10-30% | >30% |
| CI reliability | Passing runs / total runs (7-day) | >95% | 80-95% | <80% |
| 指标 | 计算公式 | 健康值 | 预警值 | 临界值 |
|---|---|---|---|---|
| PR合并率 | 每周合并PR数量 | >3/周 | 1-3/周 | <1/周 |
| Issue关闭率 | 每周关闭Issue数量 | >5/周 | 2-5/周 | <2/周 |
| 评审响应时长 | PR开启后到首次评审的平均小时数 | <24h | 24-72h | >72h |
| Issue响应时长 | 团队首次回复的平均小时数 | <8h | 8-48h | >48h |
| 闲置PR占比 | 开放超过14天的PR / 总开放PR数 | <10% | 10-30% | >30% |
| CI可靠性 | 7天内CI成功运行次数 / 总运行次数 | >95% | 80-95% | <80% |
Contributor Metrics
贡献者指标
| Metric | Formula | Notes |
|---|---|---|
| PR commit ratio | Commits / PRs merged | High ratio = large PRs, consider splitting |
| Review coverage | PRs reviewed by others / total PRs merged | Low = single-contributor bottleneck |
| First-time contributor rate | New contributors / total active contributors | Healthy community growth signal |
| Contributor retention | Active last month AND active this month / active last month | Engagement health |
| Bus factor | Min contributors whose departure halts 50%+ of commits | <3 is high risk |
| 指标 | 计算公式 | 说明 |
|---|---|---|
| PR提交比率 | 提交数 / 合并PR数 | 比率高说明PR体积大,建议拆分 |
| 评审覆盖率 | 被他人评审过的PR / 总合并PR数 | 占比低说明存在单人贡献瓶颈 |
| 首次贡献者占比 | 新贡献者 / 总活跃贡献者 | 社区健康增长的信号 |
| 贡献者留存率 | 上月活跃且本月仍活跃的贡献者 / 上月活跃贡献者 | 参与度健康度指标 |
| 巴士因子 | 最少需要多少名贡献者离职就会导致50%以上提交停滞 | <3属于高风险 |
Bottleneck Categories
瓶颈分类
| Category | Signals | Example Finding |
|---|---|---|
| Review bottleneck | High PR open time, review-requested PRs >3 days | "4 PRs waiting for review >3 days - assign or redistribute" |
| CI bottleneck | Frequent failures, long runtimes | "Test suite 45min avg - 2x slower than 4-week average" |
| Stale work | Issues/PRs with no activity >14 days | "7 issues open >30 days with no recent comments" |
| Knowledge concentration | 80%+ 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 debt | Open 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
趋势分类
| Trend | Definition |
|---|---|
| Improving | Score increased 5+ points vs previous report |
| Stable | Score within 5 points of previous report |
| Declining | Score decreased 5+ points vs previous report |
| Recovering | Score increased after 2+ consecutive Declining reports |
| New | No previous report to compare |
| 趋势 | 定义 |
|---|---|
| 改善 | 分数较上一份报告上涨5分及以上 |
| 稳定 | 分数较上一份报告波动在5分以内 |
| 下降 | 分数较上一份报告下跌5分及以上 |
| 恢复 | 连续2份及以上报告下降后分数上涨 |
| 新增 | 无上一份报告可对比 |
Scorecard Output Format
记分卡输出格式
Single Repo
单仓库
markdown
undefinedmarkdown
undefinedRepository Health Score
仓库健康度评分
| Metric | Value |
|---|---|
| Repo | owner/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} |
undefinedMulti-Repo Scorecard
多仓库记分卡
markdown
undefinedmarkdown
undefinedRepository Health Scorecard
仓库健康度记分卡
| Repo | Score | Grade | Trend | Critical Issues | Notes |
|---|---|---|---|---|---|
| owner/repo-a | 88 | B | Improving | 0 | |
| owner/repo-b | 54 | C | Declining | 1 | Security alert unresolved |
| owner/repo-c | 22 | F | Stable | 3 | Review bottleneck + stale PRs |
| Average | 54.7 | C | - | 4 |
---| 仓库 | 分数 | 等级 | 趋势 | 严重问题 | 备注 |
|---|---|---|---|---|---|
| owner/repo-a | 88 | B | 改善 | 0 | |
| owner/repo-b | 54 | C | 下降 | 1 | 安全警报未处理 |
| owner/repo-c | 22 | F | 稳定 | 3 | 评审瓶颈+闲置PR |
| 平均值 | 54.7 | C | - | 4 |
---Sprint & Iteration Metrics
冲刺与迭代指标
When project boards are configured, track sprint metrics:
| Metric | Formula |
|---|---|
| Sprint completion rate | Done items / total sprint items x 100 |
| Carryover rate | Items moved to next sprint / planned items |
| Cycle time | Average days from "In Progress" to "Done" |
| Throughput | Items completed per sprint |
| Blocked rate | Items in "Blocked" state / total in-progress |
当配置了项目看板时,跟踪冲刺指标:
| 指标 | 计算公式 |
|---|---|
| 冲刺完成率 | 完成项 / 总冲刺项 x 100 |
| 遗留率 | 移入下一个冲刺的项 / 计划项 |
| 周期时间 | 从「进行中」到「完成」的平均天数 |
| 吞吐量 | 每个冲刺完成的项数 |
| 阻塞率 | 「阻塞」状态的项 / 总进行中项数 |