ontodev / droid

DROID Reminds us that Ordinary Individuals can be Developers
BSD 3-Clause "New" or "Revised" License
4 stars 1 forks source link

Handle large number of branches #113

Closed jamesaoverton closed 2 years ago

jamesaoverton commented 2 years ago

I believe that DROID only shows ~20 branches. If a GitHub repository has more branches than that, only a subset are shown, and it's not clear to me whether it's a random subset or sorted somehow. I think this is just how the GitHub API pages results.

@lmcmicu can you confirm?

Assuming I'm right, could we (1) increase the page size, or (2) run multiple queries to get the full list?

lmcmicu commented 2 years ago

I do not believe there is any such limitation in DROID. What makes you say this?

lmcmicu commented 2 years ago

Sorry I didn't read your comment carefully enough. I meant that there is no limit built into DROID, but the GitHub API does have a limit. See: https://docs.github.com/en/rest/reference/repos#list-branches

It seems the default is 30. It can be increased to 100, or we can page as you suggest.

jamesaoverton commented 2 years ago

I think we should request the maximum number (100), and then print a warning if the response includes the maximum number of results: "Warning: Your GitHub repository includes 100 or more branches, which is more than DROID can display."