sourcegraph / sourcegraph-public-snapshot

Code AI platform with Code Search & Cody
https://sourcegraph.com
Other
10.1k stars 1.27k forks source link

On retrieving github CODEOWNERS resolve team names in rules to match team name without organization. #50654

Open cbart opened 1 year ago

cbart commented 1 year ago

This was raised by @sashaostrikov.

Using search filter given @sourcegraph/code-insights-backend team used in a CODEOWNERS rule.

We can do this by having the Ruleset be repo-aware. So that when we're matching the search input, ruleset can consider code-insights-backend be matching this rule because of the context.

cbart commented 1 year ago

Search ownership filter code lives here: https://sourcegraph.com/github.com/sourcegraph/sourcegraph@c928f0a45774d233339beacae086ac08ef16fb54/-/blob/enterprise/internal/own/search/filter_job.go?L116-148