Repository navigation
Closed
Description
Before submitting
- I searched existing issues and did not find a duplicate.
- I included enough detail to reproduce or investigate the problem.
Area
apps/server
Steps to reproduce
Related to #17805 (SSH host aliases): same result, different git mechanism.
- In the server's git config, rewrite GitHub to another host, e.g. an authenticating proxy:
(Ours comes from
[url "https://proxy.example/"] insteadOf = git@github.com: insteadOf = https://github.com/GIT_CONFIG_*in the server's environment; a gitconfig file behaves the same.) - Add a repo whose
remote.origin.urlisgit@github.com:owner/repo.gitas a project.
git remote -vprintshttps://proxy.example/owner/repo.git. - Link a
https://github.com/owner/repo/pull/NPR to a thread (gh pr createfrom the thread, orlink_pull_request). - Click the PR link with "Open pull requests in T3 Code" on.
Expected behavior
The project is recognised as github.com/owner/repo, the linked PR shows its state, and the link opens in the PR panel.
Actual behavior
- The project's repository identity is
proxy.example/owner/repowith providerunknown, because
RepositoryIdentityResolverbuilds it fromgit remote -v, which applies insteadOf. - No project matches the
github.comlink, so the client opens it in the browser. - The linked PR keeps
state: null. In our setup the server has no github.com credential (by design: the proxy
holds the token), and every sync fails withNo GitHub credential for github.comin the traces
(134PullRequestSyncReactor.syncGroupand 68ws.rpc.pullRequests.detailfailures in 53 minutes).
Nothing in the thread says so.
Suggested fix
- Classify the remote from the configured URL (
git config --get remote.<name>.url, before insteadOf),
and keep the rewritten URL for git operations. Same idea as resolvingssh -Galiases in [Bug]: remotes using an SSH host alias get no forge (no PR sync, no clone) #17805. - When PR sync or detail fails for lack of a credential, show it on the linked PR instead of an empty state.
Possibly separate: our proxy speaks the GHES API (/api/v3, /api/graphql) and gh auth token --hostname proxy.example
works, but T3 can't know that proxy.example serves github.com. A host alias setting ("github.com is served by
proxy.example") would let PR reads go through it.
Impact
Minor bug or occasional failure
Version or commit
0.1.10
Environment
Server on Linux arm64 in a container, desktop client on macOS
Logs or stack traces
GitHubNotSignedInError: No GitHub credential for github.com: run `gh auth login --hostname github.com`.
spans: PullRequestSyncReactor.syncGroup > PullRequestService.persistedRead > GitHubPullRequestApi.getPullRequestSummary > GitHubCredentials.get
Metadata
Metadata
Assignees
Labels
No labels
Activity
fix(server): keep insteadOf aliases' forge and show why a linked PR c…