Repository navigation
Conversation
…ched A multi-line --repo value was glued into one hostname, so DNS failed and the CLI said "Can't reach Prismic". The value also went to analytics as the repository. Check that the repository is a valid subdomain before putting it in a URL or header, and keep invalid values out of analytics and Sentry. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
An agent passed a list of 31 repository names to
--repo. The CLI used the whole list as one name, so:Now the CLI first checks that the value can be the
my-repoinmy-repo.prismic.io. If it can't, the command saysCheck your repository domain: "…". Pass one repository domain per command, such as "my-repo".Analytics leave it out ofrepository, but the value still shows in the command and the error. The backend still decides whether the repository exists.token create -r <31 names>token create -r <3 short names>repo view -r "a\nb"(header)type list -r "a\nb"(no--repooption)repo view -r my-repoProof: reproduced with the built CLI, with analytics captured locally. After the fix, a multi-line
--repogets the new error and analytics get no repository. A valid name works as before. New e2e tests cover both cases and pass in CI.Reviewed with sol-loop: 2 rounds with Claude Opus 5.5 in place of Sol. Verdict: approved.
Created with Claude Opus 5.5 in Claude Code.
Note
Low Risk
Input validation and clearer errors around existing repo handling; valid single-domain
--repobehavior stays the same.Overview
Invalid
--repovalues (e.g. newline-separated lists) now fail fast withCheck your repository domain: … Pass one repository domain per commandinstead of misleading "Can't reach Prismic", header crashes, or bogus analytics.The CLI adds
isSubdomaininurl.tsand routes repository URLs/headers throughgetRepositoryDomain/getRepositoryHeaders, which throwInvalidRepositoryDomainErrorwhen the value isn’t a single DNS label.index.tsonly sendsrepositoryto analytics when--repopasses that check. E2E tests cover invalid--repoonpullandtoken create.Reviewed by Cursor Bugbot for commit f3660c1. Bugbot is set up for automated code reviews on this repo. Configure here.