Skip to content

feat: dogfood published @gitpulse/cli; add Vercel config; package README#35

Merged
znat merged 8 commits intomainfrom
feat/dogfood-published-cli
May 4, 2026
Merged

feat: dogfood published @gitpulse/cli; add Vercel config; package README#35
znat merged 8 commits intomainfrom
feat/dogfood-published-cli

Conversation

@znat
Copy link
Copy Markdown
Owner

@znat znat commented May 4, 2026

Three small follow-ups now that `@gitpulse/cli@0.1.2` is live on npm.

self-deploy.yml: switch to the public consumer path

Rewritten to call the published reusable workflow (`znat/gitpulse/.github/workflows/publish-pages.yaml@v0`) with the published `@gitpulse/cli` — instead of running the local workspace inline. Every push to `main` now exercises the exact path external consumers hit:

```yaml
jobs:
publish:
uses: znat/gitpulse/.github/workflows/publish-pages.yaml@v0
with:
ai-protocol: openai
ai-base-url: https://api.minimax.io/v1
ai-model: MiniMax-M2.7
secrets:
OPENAI_API_KEY: ${{ secrets.MINIMAX_API_KEY }}
```

Bleeding-edge testing of un-released cli changes happens via PR CI (`yarn workspace @gitpulse/cli build`) and `yarn workspace @gitpulse/cli analyze` during dev.

vercel.json

Drop-in build config so connecting the repo to Vercel picks up the published-cli build hook out of the box:

```json
{
"buildCommand": "npx -y @gitpulse/cli@0 analyze && npx -y @gitpulse/cli@0 build",
"outputDirectory": ".gitpulse/out",
"installCommand": "echo Skipping install — using published @gitpulse/cli@0",
"framework": null
}
```

`framework: null` because the cli wraps Next.js internally — Vercel just sees the static output. `installCommand` is a no-op since the cli is fetched via `npx`.

cli/package.json prepack: ship README + LICENSE on npm

`@gitpulse/cli@0.1.2` shipped without a README — the `files` array in `cli/package.json` referenced `README.md` and `LICENSE` paths that don't exist in `cli/` (originals are at repo root). Added a `prepack` script that copies them before `npm pack` runs:

```json
"prepack": "cp -f ../README.md ../LICENSE ."
```

Verified via `npm pack --dry-run` — README (10.3kB) + LICENSE (34.5kB) now in the tarball.

`.gitignore`: ignore the prepack-generated `cli/README.md` and `cli/LICENSE` copies + `*.tgz` so dry-run artifacts don't get committed.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Added a dedicated "Deploy to Vercel" workflow to publish prebuilt sites.
    • Improved automatic detection of site URL/repository for Vercel, Netlify, and Cloudflare Pages (better root-deploy handling and basePath resolution).
    • CLI now ships prepack behavior for packaging and updates help text to describe auto-detection.
  • Documentation

    • Updated Quickstart and configuration docs with platform-specific auto-detection guidance and override rules.

znat and others added 2 commits May 4, 2026 11:37
… README

Three small follow-ups now that 0.1.2 is on npm:

- self-deploy.yml: rewritten to *call* publish-pages.yaml@v0 with the
  published cli (was running the local workspace inline). Every push to
  main now exercises the exact path external consumers hit — npx
  @gitpulse/cli@0 analyze + build → upload Pages artifact → deploy.
- vercel.json: build config so a Vercel project connected to this repo
  picks up the published-cli build hook out of the box. installCommand is
  a no-op since the cli is fetched via npx; framework: null because the
  cli wraps Next.js internally and Vercel just sees the static output.
- cli/package.json: prepack script copies README.md + LICENSE from repo
  root into cli/ before npm pack, so the published package on npm has a
  README (it didn't on 0.1.2 — the files entry referenced paths that
  don't exist in cli/, so npm pack silently shipped without them).
- .gitignore: ignore the prepack-generated cli/README.md and cli/LICENSE
  copies — never commit them, the originals live at root.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The npm pack --dry-run during local verification left a tarball in cli/
that got swept up by git add -A. Removing it and adding *.tgz to
.gitignore so this doesn't happen again.
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 4, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Adds platform auto-detection for repository and site URL (Vercel, Netlify, Cloudflare Pages); refactors self-deploy workflow to call a reusable publish workflow; introduces an explicit Vercel prebuilt-deploy workflow; updates CLI/site base-path logic, docs, and a CLI prepack script for packaging.

Changes

Platform Environment Auto-Detection & Deployment

Layer / File(s) Summary
Config / detection primitives
cli/src/config.ts
Adds detectRepoFullName(), detectDeployedUrl(), autoSiteUrl(), and normalizeSiteUrl() to derive repo and deployed site URL from platform env vars with a GitHub Pages fallback.
CLI surface
cli/src/cli.ts
Updates --help usage text for GITPULSE_SITE_URL to document auto-detection and the fallback pattern.
Site URL resolution
site/src/lib/seo.ts
Refactors getBaseUrl() to call the new detectDeployedUrl() helper and trim/normalize detected values; preserves explicit override and fallback behavior.
Next.js base path
site/next.config.js
Adds PaaS root-deploy detection (Vercel/Netlify/Cloudflare) and forces fallbackBasePath to '' on those platforms; otherwise retains existing GITHUB_REPOSITORY-derived fallback.
Docs / config table
README.md
Rewrites Vercel/Netlify/Cloudflare deployment guidance to document auto-detection sources, clarifies required GITHUB_REPOSITORY, and marks GITPULSE_SITE_URL as auto-detected with platform rules and fallback.
Self-deploy workflow
.github/workflows/self-deploy.yml
Replaces inline build+deploy jobs with a single publish job that uses: znat/gitpulse/.github/workflows/publish-pages.yaml@v0; moves job-level permissions into top-level permissions.
Vercel workflow
.github/workflows/deploy-vercel.yml
Adds a new workflow that runs analyze/build, stages .gitpulse/out into Vercel Build Output API layout, and runs vercel deploy --prebuilt --prod with secrets; includes workflow-level contents: read permission and concurrency.

CLI Package Distribution

Layer / File(s) Summary
Prepack step
cli/package.json
Adds a prepack script to copy repository README.md and LICENSE into cli/ before packing.
Ignore artifacts
.gitignore
Adds ignores for cli/README.md, cli/LICENSE, *.tsbuildinfo, and *.tgz (npm pack artifacts).

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant GH as GitHub Actions
  participant PublishWF as publish-pages reusable workflow
  participant CLI as `@gitpulse/cli`
  participant Vercel as Vercel (Platform)
  GH->>PublishWF: call publish-pages (ai inputs, OPENAI_API_KEY)
  PublishWF->>CLI: run analyze/build (uses env detection)
  CLI->>PublishWF: emits static output (.gitpulse/out)
  PublishWF->>Vercel: (optional) stage prebuilt output / trigger deploy
  Vercel->>GH: deployment status (via API / env)
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

Poem

🐰 I hopped through envs and found your site,

Vercel, Netlify, Cloudflare — all in sight.
I copied READMEs, packed with care,
Workflows now call a reusable pair.
Deploys land clean — a rabbit’s delight.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 27.27% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the three main changes: dogfooding the published CLI, adding Vercel configuration, and packaging README/LICENSE files.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/dogfood-published-cli

Comment @coderabbitai help to get the list of available commands and usage tips.

@greptile-apps
Copy link
Copy Markdown

greptile-apps Bot commented May 4, 2026

Greptile Summary

This PR dogfoods the published @gitpulse/cli@0 package by rewriting self-deploy.yml to call the public reusable workflow, adds a new deploy-vercel.yml CI workflow for prebuilt Vercel deploys, and introduces platform auto-detection (Vercel/Netlify/Cloudflare Pages) for GITHUB_REPOSITORY and GITPULSE_SITE_URL in both cli/src/config.ts and site/src/lib/seo.ts. The prepack script in cli/package.json was updated to the portable Node.js one-liner (addressing the previous Windows compatibility note).

Confidence Score: 5/5

Safe to merge — only P2 style/cleanup findings, no logic bugs or security issues.

All findings are P2 (dead code, misleading error message wording). Core logic for platform detection, the new Vercel CI workflow, and the simplified self-deploy are correct. No P0 or P1 issues found.

cli/src/config.ts — dead autoSiteUrl function and misleading validation error message worth cleaning up.

Important Files Changed

Filename Overview
cli/src/config.ts Adds platform auto-detection for GITHUB_REPOSITORY and site URL (Vercel/Netlify/CF Pages); dead autoSiteUrl function left over from refactor; misleading error message on format validation.
.github/workflows/deploy-vercel.yml New CI workflow that runs analyze+build in GitHub Actions and ships prebuilt output to Vercel via --prebuilt; well-structured with correct env mapping and concurrency config.
.github/workflows/self-deploy.yml Simplified to delegate to the published reusable workflow znat/gitpulse/.github/workflows/publish-pages.yaml@v0; permissions correctly elevated to pages:write + id-token:write for the inner deploy.
cli/package.json Adds portable Node.js prepack script to copy README.md and LICENSE from repo root before npm pack; previously flagged cp-based approach replaced with cross-platform Node one-liner.
site/src/lib/seo.ts Adds detectDeployedUrl() mirroring config.ts logic; getBaseUrl() now resolves Vercel/Netlify/CF Pages URLs automatically before falling back to GitHub Pages derivation.
site/next.config.js Detects PaaS root-deploy environments (Vercel/Netlify/CF Pages) to default basePath to '' instead of /, avoiding double-path issues on those platforms.
cli/src/cli.ts Minor help text update for GITPULSE_SITE_URL to reflect auto-detection on Vercel, Netlify, and Cloudflare Pages.
README.md Expanded Vercel section with CI-build path docs, updated Netlify/Cloudflare sections to reflect auto-detection, and config table updates.
.gitignore Adds ignores for prepack-generated cli/README.md and cli/LICENSE, plus *.tgz for dry-run artifacts.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[Push to main] --> B[self-deploy.yml]
    A --> C[deploy-vercel.yml]

    B --> D["znat/gitpulse/.github/workflows/\npublish-pages.yaml@v0\n(published reusable workflow)"]
    D --> E["npx @gitpulse/cli@0 analyze\n+ build"]
    E --> F[GitHub Pages]

    C --> G["npx @gitpulse/cli@0 analyze\n(GITPULSE_SITE_URL from vars.VERCEL_SITE_URL)"]
    G --> H["npx @gitpulse/cli@0 build\n(GITPULSE_BASE_PATH=none)"]
    H --> I["Stage → .vercel/output/static\n+ config.json version:3"]
    I --> J["vercel deploy --prebuilt --prod"]
    J --> K[Vercel CDN]

    subgraph "config.ts: resolveSiteUrl()"
        L{GITPULSE_SITE_URL set?} -->|yes| M[Use explicit URL]
        L -->|no| N{Platform detected?}
        N -->|Vercel| O[VERCEL_PROJECT_PRODUCTION_URL / VERCEL_URL]
        N -->|Netlify| P[URL / DEPLOY_PRIME_URL]
        N -->|CF Pages| Q[CF_PAGES_URL]
        N -->|none| R{BASE_PATH non-auto?}
        R -->|yes| S[throw — require explicit URL]
        R -->|no| T[GitHub Pages fallback]
    end
Loading

Fix All in Claude Code

Reviews (7): Last reviewed commit: "fix: apply CodeRabbit auto-fixes" | Re-trigger Greptile

Comment thread cli/package.json Outdated
Comment thread .gitignore
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@cli/package.json`:
- Line 39: The prepack script in package.json uses the Unix-only "cp -f
../README.md ../LICENSE ." which fails on Windows; replace it with a
cross-platform approach by either adding a devDependency such as "shx" or "cpx"
and updating the "prepack" script to use that (e.g., "shx cp -f ../README.md
../LICENSE .") or implement a small Node script (e.g., scripts/prepack.js) that
copies the files and change "prepack" to "node scripts/prepack.js"; ensure you
update package.json to include the chosen devDependency and the new script
entry.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: c013d29c-5e7e-4406-bb03-e902c3d14b8f

📥 Commits

Reviewing files that changed from the base of the PR and between a879a79 and a72ed8e.

📒 Files selected for processing (4)
  • .github/workflows/self-deploy.yml
  • .gitignore
  • cli/package.json
  • vercel.json

Comment thread cli/package.json Outdated
GITPULSE_SITE_URL is what the analyzer uses for state restore and what
the site uses for canonical/SEO URLs. Setting it manually after every
fresh Vercel/Netlify deploy is friction we don't need — the platforms
already expose their URL via build-time env vars.

Detection priority (in both cli/src/config.ts and site/src/lib/seo.ts):
  1. Explicit GITPULSE_SITE_URL (override)
  2. Vercel: VERCEL_PROJECT_PRODUCTION_URL (prod) / VERCEL_URL (preview)
  3. Netlify: URL / DEPLOY_PRIME_URL / DEPLOY_URL
  4. Cloudflare Pages: CF_PAGES_URL
  5. GH Pages: https://<owner>.github.io/<repo>/

Updates:
- cli/src/config.ts: autoSiteUrl() detects platforms before falling back.
- site/src/lib/seo.ts: getBaseUrl() same priority order.
- cli/src/cli.ts --help: docs reflect auto-detection.
- README: Vercel / Netlify / Cloudflare deploy guides drop the
  GITPULSE_SITE_URL row from required vars (auto-detected); Configuration
  table notes the auto-detection sources.

Net effect: zero env-var setup for the URL on Vercel/Netlify/CF Pages.
Custom domains still set GITPULSE_SITE_URL explicitly.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@cli/src/config.ts`:
- Line 46: The explicit GITPULSE_SITE_URL value is used as-is for siteUrl which
causes inconsistent shapes (trailing slash or not) versus
autoSiteUrl(repoFullName); update the siteUrl assignment so when
env.GITPULSE_SITE_URL is present you normalize it to the same shape as
autoSiteUrl by trimming any trailing slash (or otherwise ensuring a consistent
canonical form) before assigning to siteUrl; change the expression that
currently reads siteUrl: env.GITPULSE_SITE_URL || autoSiteUrl(env, repoFullName)
to call a small normalization helper (or inline trim logic) that processes
env.GITPULSE_SITE_URL so both explicit and auto-detected URLs match.

In `@README.md`:
- Line 174: The README's config table entry for GITPULSE_SITE_URL is missing the
Netlify fallback env var DEPLOY_URL; update the GITPULSE_SITE_URL description to
include DEPLOY_URL alongside URL and DEPLOY_PRIME_URL so the documented fallback
list matches the platform behavior and code.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 737cb35d-9a9d-456c-a4bc-a933054ca2d9

📥 Commits

Reviewing files that changed from the base of the PR and between a72ed8e and 930f02c.

📒 Files selected for processing (4)
  • README.md
  • cli/src/cli.ts
  • cli/src/config.ts
  • site/src/lib/seo.ts

Comment thread cli/src/config.ts Outdated
Comment thread README.md Outdated
znat and others added 2 commits May 4, 2026 13:11
…e URL, complete Netlify list

Three review-driven fixes:

- cli/package.json: replace 'cp -f' (Unix-only) with a Node one-liner
  for prepack so npm pack works on Windows too. Verified locally;
  produces the same tarball contents.
- cli/src/config.ts: normalize explicit GITPULSE_SITE_URL to always
  have a trailing slash, matching the auto-detected shape. Prevents
  path-join inconsistencies in site-fetcher (was passing through
  raw input, which let 'https://host' vs 'https://host/' diverge).
- README.md: add DEPLOY_URL to the Netlify auto-detection list in
  the Configuration table — it's the third fallback in the actual
  detection logic but was missing from the docs.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Treats gitpulse-on-Vercel like a consumer would using --prebuilt: CI runs
analyze + build with @gitpulse/cli@0, then ships .gitpulse/out to Vercel
via 'vercel deploy --prebuilt'. Vercel runs no build, sees no LLM keys,
needs no env vars maintained on its side.

Runs alongside self-deploy.yml (Pages) — both deploy gitpulse on every
push to main, decoupled.

Architecture:
- Resolves the production URL via Vercel's /v9/projects API (prefers
  custom domains, falls back to <project>.vercel.app).
- Pins GITPULSE_SITE_URL to that URL for both analyze (state restore)
  and build (canonical <meta> tags).
- Stages .vercel/output/{static,config.json} per Vercel's Build Output
  API v3 format, then 'vercel deploy --prebuilt --prod'.

vercel.json deleted: the previous on-Vercel-build config is obsolete
under this pattern. Vercel never sees a build now.

cli/src/config.ts: auto-detects GITHUB_REPOSITORY from VERCEL_GIT_REPO_*
or Netlify's REPOSITORY_URL when GITHUB_REPOSITORY isn't set explicitly.
This also helps consumers running the on-Vercel-build pattern (option A)
since they no longer need to set it manually.

site/next.config.js: detects PaaS deployment context (VERCEL / NETLIFY /
CF_PAGES env vars) and forces basePath to '' regardless of
GITHUB_REPOSITORY. Means consumers on those platforms don't need to set
GITPULSE_BASE_PATH=none anymore.

README: documents both Vercel patterns side-by-side. Option A (Vercel
builds) is simplest for consumers; option 4 (CI builds, Vercel hosts) is
what gitpulse itself uses and explains the workflow inline.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Comment thread .github/workflows/deploy-vercel.yml Outdated
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
README.md (1)

65-90: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

The Vercel "simplest" recipe doesn't match what gitpulse build produces.

gitpulse build writes the exported site to .gitpulse/out; it does not produce a repo-local next build artifact. As written, this section either fails on repos without next or points Vercel at the wrong directory. Please document the actual Vercel build command/output directory for this flow instead of telling consumers to append next build.

Suggested fix
-// package.json
-{
-  "scripts": {
-    "build": "gitpulse analyze && gitpulse build && next build"
-  },
-  "devDependencies": {
-    "@gitpulse/cli": "^0"
-  }
-}
+Build Command:    npx -y `@gitpulse/cli`@0 analyze && npx -y `@gitpulse/cli`@0 build
+Output Directory: .gitpulse/out
+Framework Preset: Other / no preset
-For Vercel's auto-detection to find `next build` output, make sure the framework preset is "Next.js" and the build output is `out` (or however your `next.config.js` is configured).
+Because the CLI already produces static output, point Vercel at `.gitpulse/out` directly instead of running a consumer-side `next build`.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@README.md` around lines 65 - 90, The README's Vercel recipe is incorrect:
gitpulse build exports the site to .gitpulse/out (not the Next.js build output),
so update the instructions to use the gitpulse commands and point Vercel's
Output Directory to .gitpulse/out; specifically change the example package.json
script to run "gitpulse analyze && gitpulse build" (omit next build unless your
repo actually uses Next directly) and instruct users to set Vercel's Build
Command to run those gitpulse commands and the Output Directory to
".gitpulse/out" (reference: gitpulse build, gitpulse analyze, .gitpulse/out,
next build).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@cli/src/config.ts`:
- Around line 25-34: The guard around repoFullName (value from
env.GITHUB_REPOSITORY or detectRepoFullName(env)) accepts malformed values like
"owner-only"; add validation that repoFullName matches the "<owner>/<repo>"
pattern (e.g. non-empty owner, a slash, non-empty repo, no extra slashes) and if
it fails throw the existing Error instead of continuing; implement this check
right after computing repoFullName (before using it to build URLs) and reference
repoFullName and detectRepoFullName when locating the change.
- Around line 53-58: Replace the current inline siteUrl resolution with a small
resolver (e.g. resolveSiteUrl) that first returns
normalizeSiteUrl(env.GITPULSE_SITE_URL) when present, then returns any detected
deployed URL (normalized) from auto/detection logic, and only if neither exists
allow the GitHub Pages fallback; if GITPULSE_BASE_PATH is set and !== 'auto'
(i.e. non-default or "none"), throw an error requiring an explicit
GITPULSE_SITE_URL. Wire resolveSiteUrl to the siteUrl field (instead of the
current normalizeSiteUrl(...) ?? autoSiteUrl(...)) and reference repoFullName
when constructing the Pages fallback.

---

Outside diff comments:
In `@README.md`:
- Around line 65-90: The README's Vercel recipe is incorrect: gitpulse build
exports the site to .gitpulse/out (not the Next.js build output), so update the
instructions to use the gitpulse commands and point Vercel's Output Directory to
.gitpulse/out; specifically change the example package.json script to run
"gitpulse analyze && gitpulse build" (omit next build unless your repo actually
uses Next directly) and instruct users to set Vercel's Build Command to run
those gitpulse commands and the Output Directory to ".gitpulse/out" (reference:
gitpulse build, gitpulse analyze, .gitpulse/out, next build).
🪄 Autofix (Beta)

✅ Autofix completed


ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 4d2d6ca7-2abe-4c78-8ecb-1f970bb77e76

📥 Commits

Reviewing files that changed from the base of the PR and between 98981e0 and f71ac66.

📒 Files selected for processing (4)
  • .github/workflows/deploy-vercel.yml
  • README.md
  • cli/src/config.ts
  • site/next.config.js

Comment thread cli/src/config.ts
Comment thread cli/src/config.ts Outdated
…API call

Vercel's production alias is stable per project — the 12-line curl + jq
dance to fetch it on every workflow run was strictly more complex than
the value it provided. Replaced with a single VERCEL_SITE_URL repo
variable (vars, not secrets — the URL is public).

Trade: one more thing for maintainers to set up once, vs zero API calls
on every deploy. Net code reduction: ~30 lines across the workflow file
and README example.

If you later need a dynamic / multi-domain setup, the original API+jq
approach is in the git history.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Comment thread .github/workflows/deploy-vercel.yml
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.github/workflows/deploy-vercel.yml:
- Around line 57-60: Add a pre-step that fails fast if the VERCEL_SITE_URL repo
variable is unset: before any steps that use GITPULSE_SITE_URL (the env var
populated from vars.VERCEL_SITE_URL) in the analyze/build jobs, insert a small
check step that exits non‑zero when ${{ vars.VERCEL_SITE_URL }} is empty and
prints a clear error; ensure the check runs in the same job(s) that reference
GITPULSE_SITE_URL (e.g., analyze and build) so the workflow stops immediately
rather than proceeding with a missing URL.

In `@README.md`:
- Line 165: Docs claim GITPULSE_SITE_URL is auto-detected from URL /
DEPLOY_PRIME_URL / DEPLOY_URL, but the CLI currently only reads process.env.URL;
either update the README text (lines referenced) to state that the CLI detects
Netlify from process.env.URL only, or modify the CLI detection logic in the
config module to add fallbacks for process.env.DEPLOY_PRIME_URL and
process.env.DEPLOY_URL (so GITPULSE_SITE_URL resolution matches the docs);
ensure whichever approach you pick keeps the GITPULSE_SITE_URL wording
consistent and mention the exact env variables (URL, DEPLOY_PRIME_URL,
DEPLOY_URL) in the README.
🪄 Autofix (Beta)

❌ Autofix failed (check again to retry)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: d290d1d2-9233-49ae-bb63-5ff7d20ef584

📥 Commits

Reviewing files that changed from the base of the PR and between f71ac66 and 8b51076.

📒 Files selected for processing (2)
  • .github/workflows/deploy-vercel.yml
  • README.md

Comment on lines +57 to +60
# Hardcoded production URL (repo variable). Vercel's prod alias
# is stable per project — no need to query the API on every run.
GITPULSE_SITE_URL: ${{ vars.VERCEL_SITE_URL }}
OPENAI_API_KEY: ${{ secrets.MINIMAX_API_KEY }}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Fail fast when VERCEL_SITE_URL is missing.

At Line 59 and Line 69, ${{ vars.VERCEL_SITE_URL }} is used directly, but there’s no guard if it’s unset. That can silently point analyze/build at the wrong URL fallback. Add an explicit validation step before analyze/build.

Suggested patch
       - uses: actions/setup-node@v6
         with:
           node-version: 22
+
+      - name: Validate required repo variable
+        run: |
+          set -euo pipefail
+          if [ -z "${{ vars.VERCEL_SITE_URL }}" ]; then
+            echo "Missing required repo variable: VERCEL_SITE_URL"
+            echo "Set it in Settings → Secrets and variables → Actions → Variables."
+            exit 1
+          fi

Also applies to: 68-69

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/deploy-vercel.yml around lines 57 - 60, Add a pre-step
that fails fast if the VERCEL_SITE_URL repo variable is unset: before any steps
that use GITPULSE_SITE_URL (the env var populated from vars.VERCEL_SITE_URL) in
the analyze/build jobs, insert a small check step that exits non‑zero when ${{
vars.VERCEL_SITE_URL }} is empty and prints a clear error; ensure the check runs
in the same job(s) that reference GITPULSE_SITE_URL (e.g., analyze and build) so
the workflow stops immediately rather than proceeding with a missing URL.

Comment thread README.md
…rom required steps

The 'vercel link' step was just a way to extract orgId + projectId. Since
the dashboard exposes both directly (Project → Settings → General →
Project ID, and Team Settings → General → Team ID), most users don't
need to install the CLI locally at all.

Updated both the workflow header comment and the README's option-4
setup checklist. Kept 'vercel link' as an alternative for anyone who
already lives in the CLI.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 4, 2026

Note

Autofix is a beta feature. Expect some limitations and changes as we gather feedback and continue to improve it.

Fixes Applied Successfully

Fixed 1 file(s) based on 2 unresolved review comments.

Files modified:

  • cli/src/config.ts

Commit: 2f7b0ad8c53f39e8cbebb2396b9174e56bde7533

The changes have been pushed to the feat/dogfood-published-cli branch.

Time taken: 2m 21s

Fixed 1 file(s) based on 2 unresolved review comments.

Co-authored-by: CodeRabbit <noreply@coderabbit.ai>
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 4, 2026

Note

Autofix is a beta feature. Expect some limitations and changes as we gather feedback and continue to improve it.

⛔ CodeRabbit does not have permission to push changes to this repository. Please ensure CodeRabbit has Contents: Read and write permission.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 4, 2026

Note

Autofix is a beta feature. Expect some limitations and changes as we gather feedback and continue to improve it.

⛔ CodeRabbit does not have permission to push changes to this repository. Please ensure CodeRabbit has Contents: Read and write permission.

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