Skip to content

Fix private code host detection

Warren Gifford requested to merge fix-private-repo-detection into master

Created by: lguychard

60de302 fixed an issue on hosted Github Enterprise + public Sourcegraph whereby we failed to resolve code views because graphQL requests stemming, for example, from ensureRevisionsAreCloned(), would fail with "repository not found" instead of ERPRIVATEREPOPUBLICSOURCEGRAPHCOM. This meant that extensions could not work.

I failed to anticipate that the same issue would occur on hosted Gitlab & Bitbucket. This PR reverts 60de302 and fixes the issue for all code hosts by returning true in isPrivateRepository() when we're not on a known public code host (gitlab.com, github.com, bitbucket.org).

Merge request reports

Loading