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.
|
private async downloadIssueData(commitInfos: CommitInfo[]) { |
|
progressBar.init("Downloading issue information…", commitInfos.length); |
|
await pMap( |
|
commitInfos, |
|
async (commitInfo: CommitInfo) => { |
|
if (commitInfo.issueNumber) { |
|
commitInfo.githubIssue = await this.github.getIssueData(this.config.repo, commitInfo.issueNumber); |
|
} |
|
|
|
progressBar.tick(); |
|
}, |
|
{ concurrency: 5 } |
|
); |
|
progressBar.terminate(); |
|
} |
I couldn't find anything related to this in the docs. Is this the expected behaviour ?
We have been using
lerna-changeloginternally 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:
lerna-changelogmakes per run: ~500 api callsIf 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 ?