sourcegraph
sourcegraph copied to clipboard
Add 'internal' case for repositoryQuery
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 Can we update changelog too?