Skip to content

fix release fetch and GitHub release URL routing#324

Merged
ping-maxwell merged 4 commits into
better-auth:mainfrom
justjxke:fix/releases-fetch-routing-cache-heal
Mar 21, 2026
Merged

fix release fetch and GitHub release URL routing#324
ping-maxwell merged 4 commits into
better-auth:mainfrom
justjxke:fix/releases-fetch-routing-cache-heal

Conversation

@justjxke

Copy link
Copy Markdown
Contributor

Summary

This PR fixes release pages showing “No releases yet” for repos that do have releases, and improves GitHub release URL handling in Better Hub.

Problem

  • Some repos could end up displaying an empty releases state due to stale cached empty release data.
  • GitHub release URLs (especially tag/latest variants) were not consistently mapped to Better Hub internal release routes.

Changes

  • Added a cache-heal path for repo releases:
    • If cached release data is empty for an authenticated repo, perform one authenticated refetch and refresh cache.
  • Improved GitHub URL parsing/mapping for releases:
    • Support /releases
    • Support /releases/tag/:tag
    • Handle latest release route via canonical internal path.
  • Added route handlers:
    • .../releases/tag/[tag]/page.tsx to normalize GitHub-style release tag URLs.
    • .../releases/_latest/page.tsx to resolve latest release and redirect to canonical tag release page.
  • Kept release fetching on the authenticated Octokit path (no public unauthenticated fallback path).

Verification

  • Typecheck passed:
    • bun --cwd apps/web typecheck
  • Manual validation:
    • Repo releases that previously rendered empty now render correctly.
    • GitHub release links resolve to the expected Better Hub routes.

Notes

I considered messing with the redirect URL buttons since they seemed redundant but I wasn't sure what to make them redirect to, so if you have the browser extension they redirect you to 404.

@vercel

vercel Bot commented Mar 15, 2026

Copy link
Copy Markdown

@justjxke is attempting to deploy a commit to the better-auth Team on Vercel.

A member of the Team first needs to authorize it.

@justjxke

Copy link
Copy Markdown
Contributor Author

The commit above is a bit of a bandaid fix.

@ping-maxwell ping-maxwell merged commit 7acd6c4 into better-auth:main Mar 21, 2026
3 checks passed
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.

2 participants