-
-
Notifications
You must be signed in to change notification settings - Fork 203
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
API rate limit exceeded #422
Comments
Thanks for opening your first issue at git-cliff! Be sure to follow the issue template! ⛰️ |
Hello! 🐻
Thank you! I'm glad it is being tested already before the release.
Yes, I mentioned the reasoning behind this briefly in #363 and the problem is generating the list of "new contributors". GitHub doesn't provide an API for easily fetching this so we need all the data for figuring out if someone has contributed to the repository in the past. I don't know how to solve this yet. One thing we can do for large repos is that use date filters for the GitHub API requests so that we only request the relevant part of the history. But then you won't be able to generate the list for first-time contributors - but you can still list the contributors of the release. Do you think that would be something feasible?
This means fetching the pull request for each commit which adds up to a lot of requests as well. |
Thanks for the reply. For my use cases, I don't need "first-time contributors". It would be great if there's a knob for this. If this is disabled, we might be able to save a lot of unnecessary API calls. |
Yes, I agree. I think I send less API requests based on whether "first-time contributors" variable is used in the template and document this behavior. |
I took a stab at this at #431, however it doesn't have a significant speed up for the neovim repository. Although Any ideas?
You can see the network requests via giving |
Thanks, Fetching pull information for each of the commits can be also limited, because the number of commits in a big release can be thousands and we probably don't want to make thousands of |
Yes, it needs to fetch all the PRs in the given time range (and there is a lot 😕) There is probably a throttling issue.
Exactly. :/ |
First of all, congratulations and thanks for the great work being done on Github integration #363.
Describe the bug
On a large repository where there are a lot of commits, API rate limit is always so I can't generate the release note.
My understanding from #363 is that ALL of the commits in the repository is fetched, so in this way every git cliff attempt will be turned down by an excessive usage of APIs. Even if # of the commits to be contained in a release note is small (e.g. between two minor releases), it's not like the PR information about each commit is fetched but it's like git-cliff is trying to fetch everything.
Also, it's not clear how many requests are (unawarely) being made through git cliff. Can we make it a bit more verbose?
To reproduce
neovim/neovim has ~28k commits as of today.
Apply the patch:
Then run:
Expected behavior
No errors.
Screenshots / Logs
Bunch of API limit errors (possibly one log is per page request):
Software information
Additional Information
If I may suggest, fetching PR information for only the relevant commits, e.g., via https://api.github.com/repos/neovim/neovim/commits/COMMIT/pulls, would be an alternative, efficient way.
https://docs.github.com/en/rest/using-the-rest-api/rate-limits-for-the-rest-api
The text was updated successfully, but these errors were encountered: