GraphQL API returns invalid repository and tree URLs for repo with spaces in name (not percent-encoded)
Created by: felixfbecker
This is the root cause of https://github.com/sourcegraph/sourcegraph/issues/15615, which affects https://app.hubspot.com/contacts/2762526/company/1085513342.
Repro:
- Go to https://k8s.sgdev.org/sourcegraph.visualstudio.com/Test%20Repo
- Check the network tab for the
RepositoryRedirectandResolveRevqueries.
Actual:
RepositoryRedirect has repositoryRedirect.url: "/sourcegraph.visualstudio.com/Test Repo"
ResolveRev has repositoryRedirect.commit.tree.url: "/sourcegraph.visualstudio.com/Test Repo"
which are invalid URLs and cause React client routing to break.
Expected:
Both should be "/sourcegraph.visualstudio.com/Test%20Repo"