Skip to content

search: use exclude filters when resolving global private repos

Administrator requested to merge k/exclude-repo into main

Created by: keegancsmith

Zoekt is not aware of user permissions, so we calculate the set of private repos a user can see and pass that on to zoekt. This is only done in "global mode", otherwise we just use the repo resolver. We recently added support to exclude repos in global searches. However, that was only done for the public repositories and we didn't update the logic which calculated the set of private repositories to take that into account. This commit adds in the ExcludePattern similiar to how the repository resolver works.

Note: we should just use the repository resolver. However, we use slightly different logic for setting "UserID" in the search than the repo resolver. This commit does the simplest fix, instead of the more general fix.

Fixes #27044 (closed)

Merge request reports

Loading