Skip to content

Fix broken Star History chart links - #247

Closed
OctoBored wants to merge 1 commit into
fancydirty:mainfrom
OctoBored:fix/star-history-chart
Closed

Fix broken Star History chart links#247
OctoBored wants to merge 1 commit into
fancydirty:mainfrom
OctoBored:fix/star-history-chart

Conversation

@OctoBored

Copy link
Copy Markdown

The Star History chart in the README is currently broken, so readers cannot view the project's growth. Update the chart links in both English and Chinese README files to restore the chart.

The Star History charts in both README files are currently broken. Update their links so the project chart works again.
@vercel

vercel Bot commented Aug 21, 2026

Copy link
Copy Markdown

@OctoBored is attempting to deploy a commit to the dirtyfancy's projects Team on Vercel.

A member of the Team first needs to authorize it.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the Star History chart image URL in both the English and Chinese READMEs to restore a broken embedded chart for repository growth visibility.

Changes:

  • Replace the Star History SVG image URL in README.md.
  • Replace the Star History SVG image URL in README.zh-CN.md.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
README.md Updates the embedded Star History chart URL in the Star History section.
README.zh-CN.md Updates the embedded Star History chart URL in the Star History section.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread README.md

## Star History
![Star History Chart](https://api.star-history.com/svg?repos=fancydirty/mediary-scout)
![Star History Chart](https://star-history.dera.page/svg?repos=fancydirty/mediary-scout)
Comment thread README.zh-CN.md

## Star History
![Star History Chart](https://api.star-history.com/svg?repos=fancydirty/mediary-scout)
![Star History Chart](https://star-history.dera.page/svg?repos=fancydirty/mediary-scout)
@fancydirty

Copy link
Copy Markdown
Owner

感谢报告 —— 你指出的问题是真的,我最初误判了。

我一开始只验了 HTTP 状态码就以为官方好着,实际上 api.star-history.com 返回 200 和一张合法 SVG,但图里画的是错误信息

GitHub restricted access to star data

根因是 GitHub 于 2026-06-30 把 stargazers API 限制为仓库 admin/collaborator 才能读,star-history 的服务器对任何人的仓库都不是 collaborator,所以几乎所有 README 内嵌图表一起失效了。你发现的是一个真实的 breakage。

不过这个 PR 我不合并,换了另一个方案,两个原因:

  1. star-history.dera.page 核实后是个人自建服务器(主域首页是 Homer 仪表盘默认页),不是官方镜像。把项目门面的依赖交给不可控的第三方,对方关机或 token 过期时两个 README 都会静默失效,而我们不会收到通知。
  2. 这次的根因是 GitHub 的政策变更,star-history 是被殃及的一方。官方针对仓库所有者给了正解(fine-grained token → 加密成 sealed_token 贴进 README),既然有官方解法就用官方的。

已在 #248 用官方 sealed_token 方案修复,并顺带升级成 <picture> 支持深/浅色自适应。

也说明一下:我看过你那个域名返回的 SVG,无 script、无追踪、数据真实 —— 你没做任何坏事,只是解法我这边不适用。 问题报告本身很有价值,谢谢。

@fancydirty fancydirty closed this Aug 22, 2026
fancydirty added a commit that referenced this pull request Aug 22, 2026
图表确实坏了 —— 但不是 star-history 的错。GitHub 于 2026-06-30 把
stargazers API 限制为仓库 admin/collaborator 才能读,而 star-history 的
服务器对任何人的仓库都不是 collaborator,于是所有 README 内嵌图表一起失效。
官方 SVG 现在渲染的是「GitHub restricted access to star data」。

采用官方给仓库所有者的解法:fine-grained token 经 star-history 加密成
sealed_token 贴进 README(明文 token 不出现在仓库里,服务端解密后在内存中
用完即弃)。实测三个变体(dark/light/默认)均返回真实数据 —— 日期轴到 Aug 16、
Y 轴 1200,与当前 1347 stars 吻合。

顺带升级成 <picture>:按读者的深/浅色模式自动切换主题。

**没有采用 PR #247 提出的第三方替换**(star-history.dera.page):那是个人
自建服务器(主域首页是 Homer 仪表盘默认页),把项目门面的依赖交给不可控的
第三方,对方关机或改图我们都不会知情。而且这次的根因是 GitHub 的政策变更,
star-history 是被殃及的一方,不该因此背弃他们 —— 官方既然给了正解就用官方的。

token 权限已卡到最小:仅本仓库 + Metadata:Read-only(只能读公开 star 数)。
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants