Skip to content

Cost of openGithubRepository might be too high #9

@zardoy

Description

@zardoy

I really love GitHub GraphQL API, I can see that it is much faster and allows to return more data. Moreover, I've discovered that it allows to do things that is not possible to achieve with Rest API (https://github.com/zardoy/rename-repos/blob/8c53ef2e966d1fcc5a48319ddff15164a84effa5/src/git.ts#L39).

The main issue here is that when user invokes Open GitHub Repository..., via GitHub GraphQL API we are fetching ALL repos that user have access to. This includes repos where user is owner, collaborator or (organization member?). So if user owning 200 repos, collaborator in another 200 and member in several organizations... it would take a lot of API calls.
For now there is a limit of 1000 repos (this is 10 API calls with full load), in case of reaching it only warning to the output will be printed (no vscode warning notification, since notifications in vscode are extremely annoying).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions