fix(ingest): accept SSH-style remote_url (git@host:path) in payload#50
Merged
Conversation
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>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
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.