Skip to content

Explain internal repositoryQuery#286

Merged
pjlast merged 2 commits into
mainfrom
pjlast/61924-internal-repositoryquery-docs
May 2, 2024
Merged

Explain internal repositoryQuery#286
pjlast merged 2 commits into
mainfrom
pjlast/61924-internal-repositoryquery-docs

Conversation

@pjlast

@pjlast pjlast commented Apr 30, 2024

Copy link
Copy Markdown
Contributor

@vercel

vercel Bot commented Apr 30, 2024

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
sourcegraph-docs-v2 ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 2, 2024 0:52am


### Hitting GitHub Search API rate limit with repositoryQuery
When Sourcegraph syncs repositories configured via `repositoryQuery`, it consumes GitHub API search rate limit, which is lower than the normal rate limit. The `affiliated`, `public` and `none` special values, however, trigger normal API requests instead of search API requests.
When Sourcegraph syncs repositories configured via `repositoryQuery`, it consumes GitHub API search rate limit, which is lower than the normal rate limit. The `affiliated`, `public`, and `none` special values, however, trigger normal API requests instead of search API requests. `internal` is also a special value that uses the GitHub Search API to list all internal repositories.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be useful to show a couple example code-host configs demonstrating these special values?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 to @matt's suggestion. If we can add one it will be great. :)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So there is the configuration section right above this that has all of the options for a code host connection: https://sourcegraph.com/docs/admin/external_service/github#configuration

And then also, right below this there's already an example of where "repositoryQuery": ["affiliated"] is used.

I'm not sure if it makes sense to add another example here as well, since this trouble-shooting bit is regarding rate limits that are hit. Just added the bit about internal also using search quota here since it would also end up running into the rate limit issue.

@pjlast pjlast merged commit e71d05e into main May 2, 2024
@pjlast pjlast deleted the pjlast/61924-internal-repositoryquery-docs branch May 2, 2024 13:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants