Skip to content

ci: Let the Vercel ignore step fetch master despite the missing origin remote - #4212

Merged
ntucker merged 1 commit into
masterfrom
claude/project-thread-00qg51
Oct 5, 2026
Merged

ntucker merged 1 commit into
masterfrom
claude/project-thread-00qg51

Conversation

@ntucker

@ntucker ntucker commented Oct 5, 2026 •

Copy link
Copy Markdown
Collaborator

Requested by Nathaniel · project thread

Before: Vercel's build clone has no origin remote (found in #4205), so every git fetch … origin … in website/scripts/vercel-ignore.sh failed silently. Previews whose fork point was past the ~10-commit clone ended in build — no base to compare, so PRs that don't touch the site still got preview builds.

After: the script adds origin as https://github.com/$VERCEL_GIT_REPO_OWNER/$VERCEL_GIT_REPO_SLUG.git when it's missing, so the master fetch and deepen() work and the existing fetch lines stay as they were.

How: one guarded git remote add after the cd to the repo root (the clone is throwaway). The shallow-clone test cases now remove origin like Vercel does and map the GitHub URL to the local fixture with url.<base>.insteadOf; they fail without the fix and pass with it.

Verification on Vercel: this PR's preview log should show vercel-ignore: build — preview changes vs master (base …): website/scripts/vercel-ignore.sh instead of no base to compare.

🤖 Generated with Claude Code

https://claude.ai/code/session_01KqTAWD4QnKLcbMukj2phKQ


Generated by Claude Code


Note

Low Risk
Changes only the Vercel docs skip/build gate; behavior still fails open to build when git history is unavailable.

Overview
Fixes preview builds firing on PRs that don't touch the docs site when Vercel's shallow clone has no origin remote, which caused all git fetch … origin … calls (including deepen()) to fail and the script to fall through to build — no base to compare.

After cd to the repo root, the script now adds origin as https://github.com/$VERCEL_GIT_REPO_OWNER/$VERCEL_GIT_REPO_SLUG.git when it's missing and those env vars are set, so existing master-fetch logic works without changing fetch commands.

Tests for shallow clones remove origin like Vercel, set VERCEL_GIT_*, and use url.<local>.insteadOf so fetches hit the fixture repo; they exercise skip vs build when the fork is far behind master.

Reviewed by Cursor Bugbot for commit 0170eb8. Bugbot is set up for automated code reviews on this repo. Configure here.

…n remote

Vercel's build clone has no `origin` remote, so every `git fetch origin` in
vercel-ignore.sh failed and the step fell back to building. Add the remote
from VERCEL_GIT_REPO_OWNER/SLUG when it is missing. The shallow-clone test
now drops `origin` like Vercel does.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KqTAWD4QnKLcbMukj2phKQ
@changeset-bot

changeset-bot Bot commented Oct 5, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 0170eb8

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@ntucker ntucker self-assigned this Oct 5, 2026
@vercel

vercel Bot commented Oct 5, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
docs-site Ready Ready Preview Oct 5, 2026 11:16pm UTC

Request Review

@ntucker
ntucker marked this pull request as ready for review October 5, 2026 23:15
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-05T23:18:02.758974Z 0170eb8 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@ntucker
ntucker merged commit cf1c80c into master Oct 5, 2026
21 checks passed
@ntucker
ntucker deleted the claude/project-thread-00qg51 branch October 5, 2026 23:57

This branch was successfully deployed

1 active deployment
Preview — 0170eb88 Deployed Oct 5, 2026 by vercel[bot]
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