3 ms·
This is definitely not a documented "API" but if you want to take the user to sourcegraph for a specific repo/file:line@commit then the url (currently) is: sou
by zeusk 10y ago
This is definitely not a documented "API" but if you want to take the user to sourcegraph for a specific repo/file:line@commit then the url (currently) is:
sourcegraph.com/[repo]@[commit]/-/blob/[path/file]#L[line]
afaik repo must be on github.com (iirc bitbucket and GCP support was in the works) and commit can be either an absolute commit hash or a relative one like a branch name.
ie.
https://sourcegraph.com/github.com/gorilla/mux@master/-/blob/context_gorilla_test.go#L7:11 https://sourcegraph.com/github.com/gorilla/mux@master/-/blob...