Repository navigation
Conversation
Contributor
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — This narrowly restores bare GitHub repository-name resolution to the signed-in account, with existing selector behavior preserved and focused tests covering Enterprise hosts, normalization, and invalid inputs. The only new runtime work is the viewer lookup required for this newly valid input form. You can add or adjust custom eligibility rules. Learn more. |
… again Since lookups moved from gh repo view to the GitHub API, a bare name such as "notes" failed with "Repositories are named owner/name." before any request. gh read it as the signed-in account's repository; the lookup now does the same on the repository's host. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ScottN-PV
force-pushed
the
fix/17230-bare-repo-name
branch
from
October 9, 2026 21:55
ff3fdf3 to
257968d
Compare
This branch has not been deployed
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.
Problem
Since GitHub lookups moved from
gh repo viewto the GitHub API (#16321), typing a bare name such ast3codein Add project → GitHub repository fails before any request.getRepositoryCloneUrlsacceptsowner/name,host/owner/name, or a URL and rejects a single segment.ghread a bare name as the signed-in account's repository.Change
getRepositoryCloneUrlsnow reads a single-segment name (no slash or whitespace,.gitstripped) as the signed-in account's repository on the host the lookup already resolves forowner/name. It asks GitHub for the viewer's login on that host, then looks up<login>/<name>. Malformed names (me/,/notes,a/b/c/d,two words, empty) are still refused before any request. This is the first bare-name viewer lookup in the provider.createRepositoryposts a bare name touser/reposwithout one.Scope and approval
Refs #17230. The triage comment confirms the bare-name regression from #16321 and treats the generic error message as a separate question. That half is unchanged here, so other lookup failures still show the generic toast. #8300 would reject bare names in the service layer. #15969 allows them client-side and does not conflict.
Verification
An agent ran these checks. No person tested the change.
Dev app (
vp run dev) on Windows with the signed-inghaccount, Add project → GitHub repository →t3code:main)After the change, the lookup resolves to
ScottN-PV/t3codeand stops at the clone confirmation. Nothing was cloned.GitHubSourceControlProvider.test.ts: on a GitHub Enterprise host from the repository context,notes.gitreads the viewer and thenrepos/me/noteson that host and returns its clone URLs.me/,/notes,a/b/c/d, empty, andtwo wordsare refused with no request. The test fails onmainwith "Repositories are named owner/name."packages/source-control-github:vp test run src/server/GitHubSourceControlProvider.test.tsthere passes 42 tests, and the new test still fails without the fix. Package typecheck,vp lint, andvp fmt --checkon the two changed files pass.Model: Claude Opus 5.5, Claude Fable 5.1 (review), GPT-6-Astra (review). Harness: Claude Code, Codex.