Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

100 result per page not properly set #740

Open
HagegeR opened this issue Jan 13, 2025 · 0 comments
Open

100 result per page not properly set #740

HagegeR opened this issue Jan 13, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@HagegeR
Copy link

HagegeR commented Jan 13, 2025

Problem Description

Only 30 results are transmitted per API calls instead of the 100 it should have been, making this app less efficient overall API calls wise.

From looking at the debug output of the run from GA in my organization, I can clearly see during the call to the installations that the number of calls means that only 30 repos are received per call:

const existingRepoResults = await github.paginate('GET /installation/repositories')

I think this should be checked on other calls too, it could be that the setting is not working for any of the calls, I see multiple places where the setting is getting specifically set like here:

  1. per_page: 100
  2. github.apps.listInstallations.endpoint.merge({ per_page: 100 })
  3. github.apps.listInstallations.endpoint.merge({ per_page: 100 })

The last one should have been the one that affect the installation/repositories call if I understand correctly, but it does not

What is actually happening

I have 1300~ repos, there was 44 pages to go through

What is the expected behavior

only up to 14 pages should have been checked

Error output, if available

2025-01-12T12:50:33.8471618Z �[34mDEBUG�[39m (github): �[36mGitHub request: GET https://api.github.com/installation/repositories?page=44 - 200�[39m

Context

Are you using the hosted instance of probot/settings or running your own?

I'm using GA full-sync from self hosted runner

If running your own instance, are you using it with github.com or GitHub Enterprise?

github.com

Version of probot/settings

N/A

Version of GitHub Enterprise

N/A

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant