fix: use vercel commit sha for footer git link - #16
Merged
Conversation
Map VERCEL_GIT_COMMIT_SHA to NEXT_PUBLIC_GIT_SHA at build time so the footer commit link works on Vercel without manual env configuration. Docker and GitHub Actions builds that set NEXT_PUBLIC_GIT_SHA explicitly are unchanged. Co-authored-by: Robert Eggl <robert@eggl.dev>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
roberteggl
marked this pull request as ready for review
July 26, 2026 22:11
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The footer commit link uses
NEXT_PUBLIC_GIT_SHA, which was only set in Docker/GitHub Actions builds. On Vercel it fell back to"development".This maps Vercel's built-in
VERCEL_GIT_COMMIT_SHAtoNEXT_PUBLIC_GIT_SHAat build time when the variable is not already set.Changes
envmapping innext.config.mjswith fallback order:NEXT_PUBLIC_GIT_SHA(explicit, e.g. Docker/CI)VERCEL_GIT_COMMIT_SHA(Vercel deployments)"development"(local dev)Test plan
bunx contentlayer2 buildbunx tsc --noEmitbunx biome ci .