Skip to content

handling issues resource more efficiently #42

@tomasohCHOM

Description

@tomasohCHOM

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    1-MEDIUMYou may need to be familiar with the codebase to resolve this issue.help wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions