Skip to content

search: perform -repo exclusion for Sourcegraph.com

Administrator requested to merge github/fork/fedealconada/GH-10481 into master

Created by: fedealconada

Hey @rvantonder, here's the PR to fixes #10481

Basically, the problem was what you pointed out: you are not applying excludePatterns. I thought a bit where the exclusion should take place and I've came to the conclusion that either we could do it after this line or, we could change the signature of defaultRepositories (I checked it's only called from one and only one place) to receive also the excludePatterns and do the filtering inside there. And I went for the latter option (I also thought about instead of passing excludePatternsto defaultRepositories function, to pass a function that filters elements but then I though it could be of overthinking).

For the tests, I've just added more cases on search_test.go

What do you think about this approach? I have anyways made the PR a draft one.

Fixes #10481

Merge request reports

Loading