Extension API should expose information about the code host, raw repo name, revision and file path without URI parsing
Created by: lguychard
See https://sourcegraph.com/github.com/sourcegraph/sourcegraph/-/blob/web/src/repo/blob/Blob.tsx#L324:30
As an example, when visiting https://sourcegraph.sgdev.org/sourcegraph/sourcegraph/-/blob/cmd/gitserver/server/cleanup.go, the resource URI passed by the extension API includes the repository name generated according to repositoryPathPattern
, not the repository URI:
"git://sourcegraph/sourcegraph?33b4d1e0d26e9a9c03ea6c5a534f3e11e7dfc3ee#cmd/gitserver/server/cleanup.go"
By contrast, the browser extension generates the following URI:
"git://github.com/sourcegraph/sourcegraph?33b4d1e0d26e9a9c03ea6c5a534f3e11e7dfc3ee#cmd/gitserver/server/cleanup.go"
This is an issue when extensions expect to be able to parse a repo URI from a resource URI, like Codecov does: