Skip to content

fix(ingest): accept SSH-style remote_url (git@host:path) in payload#50

Merged
trentas merged 1 commit into
mainfrom
fix/ingest-accept-ssh-remote-url
May 14, 2026
Merged

fix(ingest): accept SSH-style remote_url (git@host:path) in payload#50
trentas merged 1 commit into
mainfrom
fix/ingest-accept-ssh-remote-url

Conversation

@trentas
Copy link
Copy Markdown
Contributor

@trentas trentas commented May 14, 2026

Zod schema on /api/ingest validated remote_url with .url(), which only accepts WHATWG URLs (scheme://). CLI on SSH-configured machines (most devs) sends git@github.com:org/repo.git — no scheme, rejected with Invalid URL. Push fails, remote_url stays NULL, DORA matching stays broken on those machines.

Relaxed to .min(1).optional(). Value is informational; normalizeRepoSlug downstream already handles the SSH form.

The schema validated `remote_url` with Zod's `.url()`, which only
accepts WHATWG URLs (scheme://...). The CLI's new \`remote_url\`
plumbing (#48 / v1.0.7) sends whatever \`git remote get-url origin\`
returns; on machines configured with SSH that's
\`git@github.com:org/repo.git\` — no scheme, rejected by Zod with:

    "remote_url":["Invalid URL"]

So the v1.0.7 CLI sends the value as intended, the server rejects the
whole push, and \`repositories.remote_url\` stays NULL — defeating the
fix entirely on SSH-configured machines.

Relax the schema to `z.string().min(1).optional()`. The value is
informational metadata: it never gets fetched, never embedded as HTML,
only normalized via `normalizeRepoSlug` for DORA matching (which
already understands the SSH form: `^git@([^:]+):` → `host/$1`).

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

vercel Bot commented May 14, 2026

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

Project Deployment Actions Updated (UTC)
clickbus-iris Ready Ready Preview, Comment May 14, 2026 2:22am

Request Review

@trentas trentas merged commit d48af2b into main May 14, 2026
4 checks passed
@trentas trentas deleted the fix/ingest-accept-ssh-remote-url branch May 14, 2026 18:41
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