Skip to content

Conversation

@Keinkil
Copy link
Contributor

@Keinkil Keinkil commented Nov 13, 2025

This could be useful for internal zoekt instances where internal and public repositories are fine to index for search purposes, but private may not be.

This could be useful for internal zoekt instances where internal and
public are fine to index for search purposes, but private may not be.
Copy link
Contributor Author

@Keinkil Keinkil Nov 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Semi-unrelated to this change, but

"github.com/google/go-github/v27/github"

This is very old.
I didn't dare try to do a ~50 version bump in this, but the newer version does have a "visibility" attribute for github.Repo, which can be used for this as well, but one could build a list of "public,private,internal" and choose any combination or "all" to index.

With the current version, I could only find a method of adding "private or not".

@keegancsmith
Copy link
Member

keegancsmith commented Nov 14, 2025 via email

@Keinkil
Copy link
Contributor Author

Keinkil commented Nov 14, 2025

I ran some local tests, compiling and running zoekt-mirror-github, filtering with visibility seems to work as expected.
I did forget to mention the version-bump in the commit message however, so if you want me to, let me know and I'll try to fix that.

Copy link
Member

@keegancsmith keegancsmith left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. And thanks again for upgrading the github client. Got one inline comment.

Allows for filtering on Public, Private, Internal repositories or any
combination of these.

Allows for explicit control of what zoekt clones and indexes from
github.

* Bump go-github to v78
The visibility attribute is not exposed in older versions of the
library.
@keegancsmith keegancsmith merged commit c8262b8 into sourcegraph:main Nov 14, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants