`lerna-changelog` making a request to github api for each PR
issammani opened this issue · comments
We have been using lerna-changelog
internally at work to keep our changelog up to date. What we have noticed lately is that the github api rate limit is being exceeded.
Some metrics:
- Github API rate limit: 5000 api calls
- Number of PRs: ~300 PRs
- Number of API calls
lerna-changelog
makes per run: ~500 api calls
If we run the changelog generation process more than 9 times within an hour we exceed the limit. This is due to the fact, that the code is making an api call (fetch) for each PR.
lerna-changelog/src/changelog.ts
Lines 152 to 166 in eb20411
I couldn't find anything related to this in the docs. Is this the expected behaviour ?
this is the expected behavior, but it should use an on-disk HTTP cache and AFAIK cache hits don't count towards that API request limit.
an alternative might be to use the GraphQL API of GitHub, but that needs further investigation.