Skip to content

fix(vercel): build only the canonical GEM project#140

Merged
support371 merged 2 commits into
mainfrom
fix/vercel-canonical-project-guard
Jul 6, 2026
Merged

fix(vercel): build only the canonical GEM project#140
support371 merged 2 commits into
mainfrom
fix/vercel-canonical-project-guard

Conversation

@support371

@support371 support371 commented Jul 6, 2026

Copy link
Copy Markdown
Owner

Adds a Vercel ignored-build guard using the canonical project ID and simplifies the build command so duplicate Vercel projects connected to the same repository skip automatically.

Summary by Sourcery

Build:

  • Configure a Vercel ignore script that skips builds for non-canonical projects based on VERCEL_PROJECT_ID.

@sourcery-ai

sourcery-ai Bot commented Jul 6, 2026

Copy link
Copy Markdown
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Adds a Vercel build ignore script that uses a canonical project ID so only the main GEM project runs builds, and duplicate projects attached to the same repo are skipped automatically.

Flow diagram for Vercel build ignore script behavior

flowchart TD
    A[Start vercel-ignore.mjs] --> B[get VERCEL_PROJECT_ID]
    B --> C{currentProjectId is set?}
    C -->|no| D[log VERCEL_PROJECT_ID is unavailable; continue the build safely]
    D --> E[process exit code 1]
    C -->|yes| F{currentProjectId === canonicalProjectId}
    F -->|yes| G[log Canonical Vercel project; continue the build]
    G --> H[process exit code 1]
    F -->|no| I[log Ignoring duplicate Vercel project; canonical project is canonicalProjectId]
    I --> J[process exit code 0]
Loading

File-Level Changes

Change Details Files
Introduce a Vercel ignore script that gates builds based on a canonical project ID, allowing only the canonical project to proceed and causing duplicate projects to be skipped.
  • Define a hard-coded canonical Vercel project ID and read the current project ID from the VERCEL_PROJECT_ID environment variable.
  • Add guard logic: if VERCEL_PROJECT_ID is missing, log a message and allow the build to continue; if it matches the canonical ID, log and allow the build; otherwise, log that the project is a duplicate and exit with a status that causes Vercel to ignore the build.
scripts/vercel-ignore.mjs

Possibly linked issues


Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@vercel

vercel Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

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

Project Deployment Actions Updated (UTC)
gem-enterprise Error Error Open in v0 Jul 6, 2026 3:02am

@support371
support371 merged commit 4897cf8 into main Jul 6, 2026
6 of 21 checks passed
@support371
support371 deleted the fix/vercel-canonical-project-guard branch July 6, 2026 03:03

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've left some high level feedback:

  • Consider sourcing the canonical project ID from configuration or an environment variable instead of hard-coding it in vercel-ignore.mjs to avoid future code changes if the canonical project changes.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- Consider sourcing the canonical project ID from configuration or an environment variable instead of hard-coding it in `vercel-ignore.mjs` to avoid future code changes if the canonical project changes.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

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