-
Notifications
You must be signed in to change notification settings - Fork 433
Description
It appears that the recommended configuration for this action will make 11 calls to the GitHub REST API per push and per language, which can add up quickly and make it too easy to reach the rate limit of 1000 calls per hour with the default Actions token.
getWorkflowPath()makes two calls, and seems to be called twice from github/codeql-action/init@v1.- It looks like one is constructing a cache key like ".github/workflows/filename.yml:jobid".
- The other seems to be linting the job definition?
- github/codeql-action/init@v1 then makes two calls to update the status.
- github/codeql-action/autobuild@v1 also makes two calls to update the status.
- github/codeql-action/analyze@v1 makes another two calls to update the status, plus one more in between to actually upload the results.
I'd expect just two or three calls to actually be needed: one (maybe) to update the status to "working" at the start, one to upload the results, and one to update the status to "completed" at the end.
If the cache key and linting are needed, could you convince the Actions team to supply the workflow file path via an environment variable or context property so you don't have to make two API calls to fetch it? It looks like they already conditionally provide this information in github.workflow (and maybe also GITHUB_WORKFLOW) if the workflow yaml file doesn't name the workflow itself.
FYI, this came up when I was working with GitHub Developer Support to try to figure out why we kept hitting the API rate limits, and I noticed that this action was responsible for a significant fraction of the calls. The support person suggested I report it to you directly.