Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: prevent chance of rate limits when querying GitHub because of unauthenticated calls; fix tests, upgrade deprecated dependency #6

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

faubion-hbo
Copy link

@faubion-hbo faubion-hbo commented Aug 17, 2023

Problem

the unauthenticated limit to calling GitHub's API is 60/hour, and this limit is assigned to the IP address of the caller. in rare cases, you could be be running this action on a runner that has had its limit exhausted by other users which will cause this action to fail due to getting a rate limit error response. this is more likely to occur on self-hosted runners, especially if a runner label that maps to few individual runners is frequently used.

Solution

the env var GITHUB_TOKEN is set to a provisioned token for each action run, so its limits are isolated (and much higher); therefore, if we use it in the Octokit client then the only way an error can occur is if the action run exhausts the limit itself.

Additionally...

  • fixed test.js to pass and added comments to give future devs a heads up
  • upgraded actions/core dependency as current version is deprecated (pending deletions)

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Aug 17, 2023

CLA Not Signed

@faubion-hbo faubion-hbo changed the title fix: use GITHUB_TOKEN for auth, fix tests, upgrade deprecated dependency fix: prevent chance of rate limits when querying GitHub because of unauthenticated calls; fix tests, upgrade deprecated dependency Aug 18, 2023
@admin-tecio
Copy link

would be great to see this implemented, please push this
thank you very much !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants