google / zoekt

Fast trigram based code search
1.69k stars 113 forks source link

Feature request: Mirror GitHub repos of specific type #75

Open nikos912000 opened 5 years ago

nikos912000 commented 5 years ago

It'd be nice to be able to mirror GitHub repos of specific type(s).

Note that currently Zoekt lists and mirrors orgs by calling getUserRepos. Check the comments on #71.

If we want to implement this feature, we'll need to introduce GithubOrg in addition to GithubUser since the type request parameter differs between these entities.

See here and here.

hanwen commented 5 years ago

in #71 we decided that users and orgs are the same for the purposes of mirroring, so I don't understand what this issue is about. What do you want to do that you cannot do today?

nikos912000 commented 5 years ago

Can someone list/mirror repos of specific type (e.g. owner for a user) in the current implementation of the GitHub mirror? I've added this option to BitBucket Server mirror here, but this hasn't been introduced yet in the GitHub mirror here.

In #71 we indeed decided there's no difference in the current implementation. This is because we haven't yet introduced filtering by type in the repos. If we do so (as part of this feature request) we need to treat orgs and users differently.

Let me know if that makes sense or if I'm missing anything.

ezkl commented 5 years ago

@nikos912000 @hanwen On a somewhat related note, I submitted a patch earlier today that adds GithubOrg support to the mirror config. I found the change necessary to retrieve private repositories from a github organization using a properly scoped access token.