Support org SSH users and gh-resolved remotes for pull request review#131
Open
KATT wants to merge 1 commit into
Open
Support org SSH users and gh-resolved remotes for pull request review#131KATT wants to merge 1 commit into
KATT wants to merge 1 commit into
Conversation
Co-authored-by: Cursor <cursoragent@cursor.com>
KATT
marked this pull request as ready for review
July 17, 2026 11:51
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.
Background
codiff pr <number>(and PR URLs) fail with "Pull request owner/repo does not match a GitHub remote in this repository." in repositories whose remotes don't use the plaingit@github.com:SSH user. GitHub organizations with SSO/SSH certificates issue remotes asorg-<id>@github.com:owner/repo.git, and some setups hide the host entirely behind SSH aliases orinsteadOfrewrites. The CLI-side remote parser already handles these, but the pull request load/review path uses a stricter parser, so opening or reviewing PRs is impossible in such repositories even thoughghitself is authenticated and working.Changes
parseGitHubRemoteUrlnow recognizesorg-<id>@github.com:SSH remotes alongsidegit@github.com:.insteadOfrewrite), the repository is resolved throughgh repo view --json owner,nameand that remote is used for fetching PR refs. The lookup only runs in that case — repos with parseable remotes never spawn it — and the result is cached per repository. Genuine mismatches fail fast with the existing error.org-<id>remote matching through parsing alone (nogh repo viewcall), and an aliased-host remote resolving through gh.Test plan
vp test electron/__tests__/pull-request-review.test.ts electron/__tests__/command-line.test.ts(19/19)vp check --fixcleanvpr buildand manually opened a PR withcodiffin a repository whose origin uses anorg-<id>@github.comremotebanana banana banana
Made with Cursor