-
Type:
Improvement
-
Resolution: Unresolved
-
Priority:
Minor
-
Component/s: github-branch-source-plugin
For listing repositories for an organization, I believe the current approach is to iterate through the organization's whole repository list using theĀ listRepositories method while applying the user's defined filterĀ on the result. Even with theĀ configurable steps available, this may not scale well for large organisations with many repositories and regularly hit the API rate limit.
I believe that this can be improved by instead using the searchRepositories method as this uses GHRepositorySearchBuilder which implements GitHub's v3 search API rather than the repository API.
With the search API you can then achieve the same desired result by performing filteringĀ using the query parameters available, but using this APIĀ would greatly reduce the amount of API calls necessary to return the repositories for an organisation, for example:
Ā
/search/repositories?q=org:orgName nameFilter
Ā