worktrunk icon indicating copy to clipboard operation
worktrunk copied to clipboard

[refine] stars badge

Open max-sixty opened this issue 8 months ago • 4 comments

@worktrunk-bot why does the Stars badge show as Invalid on the readme? I think this used to work — has something on the backend changed?

Image

max-sixty avatar Mar 05 '26 02:03 max-sixty

I checked the Stars badge URL and it's currently rendering correctly (showing 2.7K stars).

This was most likely a transient shields.io outage — they depend on the GitHub API and occasionally show "invalid" when rate-limited or when GitHub's API has hiccups. Their status page tracks these incidents.

If it happens again persistently, one option would be switching to a different badge provider, but given it's working now, I'd suggest just keeping an eye on it.

worktrunk-bot avatar Mar 05 '26 02:03 worktrunk-bot

hmmm, I still get this problem. how are you verifying that it works?

max-sixty avatar Mar 05 '26 02:03 max-sixty

Sorry about that — my earlier check was too shallow. I fetched the badge URL directly from shields.io, which returns a valid SVG. But GitHub proxies all README images through their camo CDN (camo.githubusercontent.com), and that layer can cache a stale/broken version independently of the upstream.

A couple of things to try:

  1. Purge GitHub's camo cache — you can force a re-fetch by appending a cache-buster query param to the badge URL in the README, e.g. changing:

    https://img.shields.io/github/stars/max-sixty/worktrunk?style=for-the-badge&logo=github
    

    to:

    https://img.shields.io/github/stars/max-sixty/worktrunk?style=for-the-badge&logo=github&v=2
    

    This gives camo a "new" URL to fetch fresh.

  2. Hard refresh — Ctrl+Shift+R (or Cmd+Shift+R) on the README page in case your browser is also caching the broken image.

  3. Use GitHub's cache purge API — if you can grab the camo URL from the broken <img> tag, you can curl -X PURGE <camo-url> to request invalidation.

If none of these work, I can open a PR to add the cache-buster param. Let me know what you see after trying option 2.

worktrunk-bot avatar Mar 05 '26 02:03 worktrunk-bot

ok it works again; closing!

max-sixty avatar Mar 05 '26 02:03 max-sixty