DataDog / system-tests

Test framework for libraries and agents.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Allow authenticating to the github API to avoid hitting rate limits

vandonr opened this issue · comments

some scripts depend on the github API (the one I had a problem with was dotnet/install_ddtrace.sh, which queries the API to get the latest version of the tracer), and when using them from a shared location (like the office), it's very easy to hit the rate limits, which in my case prevented me from rebuilding the image.

We could let users use the authenticated API instead, which has higher limits (and per-user limits instead of per-IP). They could do that by setting an env variable GITHUB_TOKEN, that'd have to be passed to docker, and used in the curl headers when necessary (and only if present, to avoid breaking everyone's workflow).
See https://docs.github.com/en/rest/authentication/authenticating-to-the-rest-api