FormidableLabs / pull-report

Create reports for open GitHub pull requests / issues for organizations and users.
MIT License
63 stars 16 forks source link

Support for teams? #25

Open fpedroza opened 4 years ago

fpedroza commented 4 years ago

Does this support organization teams? or restricting the repos to be included? I'm part of a LARGE organization and so there are a lot of PRs and it appears I'm only getting back the first page of results.

fpedroza commented 4 years ago

I don't believe this noted restriction would be the issue, but perhaps related?

pull-report retrieves at most 100 pull requests/issues for any repo.

ryan-roemer commented 4 years ago

Hi!

For teams it doesn't directly support them. The query level is org and then pull-report manually filters things down to just a user list if supplied by the user.

For the limit, it's set here https://github.com/FormidableLabs/pull-report/blob/master/pull-report.js#L60-L71 . The needed change would be to use @octokit/rest (the new name for the github module) to paginate through results passing the page token until all results are done. Or maybe something more efficient could be done with the Search query API instead of the direct issues or pulls API.

See, e.g.:

All in all, though, this library is ancient. Given how simple it is, it might be actually easier for a ground-up rewrite using @octokit/rest and the modern libs... Good luck!