Skip to content

Query GitHub directly for tag-at-HEAD (bypass Vercel mirror)#33

Merged
heyitsStylez merged 1 commit into
mainfrom
version-github-direct
May 6, 2026
Merged

Query GitHub directly for tag-at-HEAD (bypass Vercel mirror)#33
heyitsStylez merged 1 commit into
mainfrom
version-github-direct

Conversation

@heyitsStylez
Copy link
Copy Markdown
Owner

Summary

  • Prefer https://github.com/{owner}/{repo}.git (from VERCEL_GIT_REPO_OWNER/SLUG) over origin when ls-remoting for the tag at HEAD.
  • Prefer VERCEL_GIT_COMMIT_SHA over local git rev-parse for the SHA we match against.

Why

PR #32's origin fallback didn't help — Vercel's origin is an internal mirror that lags the actual GitHub repo by seconds when a deploy hook fires immediately after a tag push. The build for ad829b3 happened before the mirror saw the new tag, so even the fallback returned nothing and git describe --tags --always produced the short SHA.

Querying GitHub directly bypasses Vercel's mirror entirely. Local builds and CI without Vercel env vars still use origin.

Test plan

  • Unit tests pass (python3 -m unittest discover -s test/build — 8 tests).
  • python3 build.py --check clean.
  • After merge, footer + Track Wallet popup show the tag.

🤖 Generated with Claude Code

Previous PR added an ls-remote fallback against `origin`, but Vercel's
`origin` points at an internal mirror that lags GitHub by a few seconds
when a deploy hook fires immediately after a tag push — so even the
fallback returned no tag and the footer kept showing a SHA.

Prefer `https://github.com/{owner}/{repo}.git` (built from VERCEL_GIT_REPO_*
env vars) over `origin` for the ls-remote step, and prefer
VERCEL_GIT_COMMIT_SHA over local rev-parse for the SHA we match against.
That bypasses Vercel's mirror entirely for the version lookup.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented May 6, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
hyperwheel Ready Ready Preview, Comment May 6, 2026 9:02am

@heyitsStylez heyitsStylez merged commit 76f9626 into main May 6, 2026
4 checks passed
@heyitsStylez heyitsStylez deleted the version-github-direct branch May 6, 2026 09:03
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.

1 participant