Community metrics can silently go stale: updatedAt is never rendered and a failed fetch keeps old numbers
维护者通常 1 天内回复
评估
这个 Issue 还没有评估数据。
描述
Problem
website/src/data/githubData.json drives the homepage community metrics. It is regenerated at build time by scripts/fetch-github-data.js (npm prebuild), and two things make it impossible to tell fresh data from months-old data:
- A failed fetch keeps the old numbers. The script reads the existing file first and preserves
contributorsandstats; if the API call then fails, it writes the preserved values back and only refreshesupdatedAt. The payload is written unconditionally at the end. - Nothing renders
updatedAt.grep -rn "updatedAt" website/srcreturns no matches.Contributors.tsx:12readscontributors;MonthlyPulse.tsx:7-9readsstats. The timestamp is written, committed, and then never shown.
Evidence (2026-10-14)
- Committed snapshot:
updatedAt 2026-08-01,mergedPRs 136 / openIssues 12 / closedIssues 56. - A fetch run today:
162 / 9 / 77.
Those two states render identically to a visitor. If a fetch fails — rate limiting on an unauthenticated build (local builds here inject 0 env vars, no GITHUB_TOKEN), network hiccup, expired token — the site ships the older numbers with no marker.
Impact
- Visitors cannot judge how current the metrics are.
- Maintainers have no signal that a build silently fell back to a previous snapshot; the site keeps looking healthy.
- The snapshot in the repo is already ~10 weeks old, so the fallback path is a real, not theoretical, state.
Suggested fix
Either or both:
- Render
updatedAtinMonthlyPulseas a "data as of …" line. - Fail (or warn loudly in the build log) when the fetch falls back to the previous snapshot, or when
updatedAtis older than a threshold such as 7 days.
Notes
Independent of the font-loading work in #325. Raised while auditing what writes githubData.json, since npm run build / npm start rewrite that file on every run.
Related: #326 — the same fetch script can render automation accounts as contributors.
- 主要语言
- TypeScript
- 星标
- 13
- 派生
- 22
- 平均合并
- 2 天 4 小时
- 30 天内合并 PR
- 13
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
IntersectMBO/developer-experience 的其他 Issue
-
Site asks for Poppins but only loads Inter可能已有人在做 @IanoNjuguna 于 1 天前认领。 未关闭bug
难度 2/5 1-3 小时 新手友好度 78/100
IntersectMBO/developer-experience#325 · 1 条评论 · 已指派 1 人 ·
维护者通常 1 天内回复
-
Canonical URL is the homepage on every page可能已有人在做 @IanoNjuguna 今天认领。 未关闭bug
难度 2/5 1-3 小时 新手友好度 78/100
IntersectMBO/developer-experience#324 · 已指派 1 人 ·
维护者通常 1 天内回复
-
Home feature cards still show link underlines可能已有人在做 @IanoNjuguna 今天认领。 未关闭bug
难度 1/5 1 小时以内 新手友好度 88/100
IntersectMBO/developer-experience#323 · 1 条评论 · 1 个 reaction · 已指派 1 人 ·
维护者通常 1 天内回复
-
documentation good first issue
难度 3/5 1-2 天 新手友好度 70/100
IntersectMBO/developer-experience#302 ·
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 58/100
IntersectMBO/developer-experience#301 ·
维护者通常 1 天内回复
查看 IntersectMBO/developer-experience 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 72/100
wormhole-foundation/wormhole#5062 ·
维护者通常 1 天内回复
-
internal os specific
难度 2/5 1-3 小时 新手友好度 65/100
frostney/GocciaScript#1688 ·
维护者通常 1 天内回复
-
integration:hermes
难度 2/5 1-3 小时 新手友好度 70/100
vectorize-io/hindsight#5592 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 72/100
vercel/streamdown#673 · 1 个 reaction ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 74/100
apache/rocketmq-dashboard#6712 ·
维护者通常 3 天内回复