This is a regression in the GitHub.com GraphQL API. See https://platform.github.community/t/unable-to-fetch-users-repositories-by-organization-membership/7557
This affects all versions of Sourcegraph. The GitHub API is not returning the repositories that a user is affiliated with. This leads to us not syncing the repositories. For most installations, this is the vast majority of repositories. For example Sourcegraph's own dogfood instance usually indexes 100s of github repositories, is now only indexing 3.
We have not yet had reports about this affecting GHE codehosts.
We do not yet have an ETA on a fix from GitHub, so we should work around the upstream issue. Likely by adjusting the query we run.
It seems the REST API is unaffected, this works for me
curl -s -H "Authorization: token $GITHUB_TOKEN" 'https://api.github.com/user/repos?affiliation=owner,collaborator,organization_member&sort=updated' | jq '.[].full_name'
I am going to cut a new release 2.12.1
2.12.1 has been released.
2.12.1 appears to not work for GitHub Enterprise (e.g. 2.14.7), but 2.12.0 does. This needs further investigation so we can find a solution that works for both.
@KattMingMing can you any other relevant details from your testing?
Most helpful comment
I am going to cut a new release 2.12.1