GitHub's REST API does not seem to aggregate number of issues in a way that it can separate issues from pull requests (at the end of the day, pull requests are a type of issue).
We are currently fetching the number of issues and pull requests by manually iterating through each, then using the issue.is_issue property to see whether it is an issue or a pull request. This is obviously very inefficient, and now that acmcsuf.com is part of this org (with 1000+ issues/PRs), it's unfeasible to grab these values from just the REST API.
We can do two things to address this:
- Use GitHub's GraphQL API, which seems to be more flexible with queries and can help us get out the responses much faster.
- Use
repo.get_pulls to grab the number of PRs first, then get the issue count by subtracting it from totalCount (this might be OK actually)
GitHub's REST API does not seem to aggregate number of issues in a way that it can separate issues from pull requests (at the end of the day, pull requests are a type of issue).
We are currently fetching the number of issues and pull requests by manually iterating through each, then using the
issue.is_issueproperty to see whether it is an issue or a pull request. This is obviously very inefficient, and now thatacmcsuf.comis part of this org (with 1000+ issues/PRs), it's unfeasible to grab these values from just the REST API.We can do two things to address this:
repo.get_pullsto grab the number of PRs first, then get the issue count by subtracting it from totalCount (this might be OK actually)