ethomson / issue-dashboard

A customizable dashboard for GitHub issues and pull requests, using GitHub Pages and GitHub Actions
https://ethomson.github.io/issue-dashboard/
MIT License
51 stars 23 forks source link

Ratelimit issues #2

Open atomfrede opened 4 years ago

atomfrede commented 4 years ago

Hi @ethomson

Thanks for the nice workflow. I have setup a small dashboard for the jhipster org on github. But we are running now in rate limiting issues (the schedule was at first every hour). Maybe it is related to the configuration as I would like to display more projects than currently on the generated dashboard and thats why running into rate limit.

Is there a way to pass an api user or so, such that the the workflow runs on the higher limit?

If it helps the configuration is here: https://github.com/hipster-labs/github-dashboard

Thanks for help or any hint in advance!

ethomson commented 4 years ago

Neat!

Sorry to hear about the rate limit issues. Right now your configuration is running with the github token that's generated for your workflow run. My recollection is that this has the same API limits as a normal user - but I could be wrong. You could try generating a PAT and using that as your token instead (https://github.com/hipster-labs/github-dashboard/blob/master/.github/workflows/dashboard.yml#L272).

But ultimately I think that this action just needs to be smarter about the way it collects data. GitHub hands us back the rate limiting information (how many additional calls you can make, when your limit refreshes), we could take advantage of that to pause data collection until there's a refresh instead of failing miserably like we do now.

atomfrede commented 4 years ago

Thanks for the quick reply. Will try a personal access token.

ethomson commented 4 years ago

Yeah - reading this page suggests that you'll only get 1000 API requests with the github token and you should get 5x more with a PAT. Let me know if that's not enough and we should be able to think about how to pause to keep the rate limit in check.

atomfrede commented 4 years ago

:thinking: It seems not to work (which is strange when looking at the limits). My personal access token has public_repo scope. I scheduled the job for noon maybe something is wrong. I will try to reduce the number of repos for now to see what will happen

atomfrede commented 4 years ago

Still the same. Rate limit exceeded for my user, even with two projects less.