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

Incomplete results due to default page size in retrieveMonitoredReposBySourceType #84

Closed
JamesTyzack opened this issue Nov 27, 2023 · 3 comments

Comments

@JamesTyzack
Copy link

The retrieveMonitoredReposBySourceType in Snyk\Index.js does not specify a result limit or do any paging on the underlying Snyk REST API that retrieves monitored repos. This causes incomplete results when counting contributors, as it is only going back to count contributors in the source control for the first 10 monitored repos; 10 being the default page size of the underlying Snyk API.

The following is used to call the Snyk API (line 117):

/orgs/${orgs[i].id}/targets?origin=${SourceType[sourceType]}&version=${snykApiVersion}

Without a &limit parameter or paging logic, it will return only 10 results.

@JamesTyzack JamesTyzack changed the title Incomplete results due to default page limit in retrieveMonitoredReposBySourceType Incomplete results due to default page size in retrieveMonitoredReposBySourceType Nov 27, 2023
@mitechie
Copy link

Linked to Jira Issue GROWTH-1934

@rikhal
Copy link

rikhal commented Nov 28, 2023

I've bumped into this issue as well. Opened a PR #85 to contribute the fix I've made to load all data.

@logangeorgebrown
Copy link
Contributor

Hi Folks, we've merged a fix for this is v2.16.0. Please let us know if you have any further problems

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants