sourcegraph icon indicating copy to clipboard operation
sourcegraph copied to clipboard

Add 'internal' case for repositoryQuery

Open pjlast opened this issue 9 months ago • 1 comments

Closes #61924

Docs update: https://github.com/sourcegraph/docs/pull/286

Adds 'internal' as a special case option for the repositoryQuery field on GitHub code host connections. This query will fetch all orgs the user of the PAT belongs to and construct a search query consisting of org:org1 org:org2 ... is:internal.

A search query is used instead of the standard org/repos endpoint, because for a large amount of orgs it is much faster to fetch all of the repositories with the search API than to hit the /repos endpoint for each individual org.

Test plan

Test added for "repositoryQuery": ["internal"]

pjlast avatar Apr 30 '24 07:04 pjlast

@pjlast Can we update changelog too?

mmanela avatar Apr 30 '24 15:04 mmanela