google / zoekt

Fast trigram based code search

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Feature request: Index all repos in a GitHub Enterprise instance

nikos912000 opened this issue · comments

Was trying to find a way to index all repos on a GitHub Enterprise instance without the need to specify an org or user.
Based on this don't think that's possible.

Current implementation
Currently the GitHub mirror is retrieving user repos by calling the List method of the go-github client. When a user is passed, this calls the /users/:username/repos endpoint otherwise it falls back to /user/repos endpoint which lists all repos on which the authenticated user has at least read permissions.
Since we don't allow an empty user string to be passed this always calls /users/:username/repos.

Future implementation
Although we could allow an empty user string and still call the List method (which in its turn would call /user/repos), I believe it'd be better in that case to call the /repositories endpoint to list all public repos. This can be called through the ListAll method of the github client.