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

Avoid paginating over all pull requests #165

Closed
kyeah opened this issue May 16, 2018 · 0 comments
Closed

Avoid paginating over all pull requests #165

kyeah opened this issue May 16, 2018 · 0 comments

Comments

@kyeah
Copy link
Contributor

kyeah commented May 16, 2018

getClosedIssues uses since to grab only the needed issues:

const { data: issues } = await this.issues.listIssues({
  state: 'closed',
  since: releaseRanges[releaseRanges.length - 1][1].date
});

getMergedPullRequests should do the same instead of paginating over all pull requests in the repo, which can take a while for large projects. If there's no since param, maybe there's a way to sort by merge time, or we could could potentially use listIssues as an initial list of all the PR issues that have been updated since the date, and then short-circuit out of getMergedPullRequests once it's seen all of them? 🤷‍

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

No branches or pull requests

2 participants