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

fix(command-link): retrieve all sites using pagination params #1899

Merged
merged 2 commits into from
Feb 17, 2021

Conversation

erezrokah
Copy link
Contributor

- Summary

Fixes #1898
Doesn't fix #258 since that issue is now related to strict SAML support in the CLI.

- Test plan

Tested manually

$ ntl sites:list --json | jq length
$ 226

- Description for the changelog

Paginate on all sites when calling listSites

- A picture of a cute animal (not mandatory but encouraged)
image

@erezrokah erezrokah requested a review from a team as a code owner February 17, 2021 16:18
@github-actions github-actions bot added the type: bug code to address defects in shipped code label Feb 17, 2021
@erezrokah erezrokah requested a review from JGAntunes February 17, 2021 16:23
@@ -159,7 +160,7 @@ or run ${chalk.cyanBright('netlify sites:create')} to create a site.`)

let sites
try {
sites = await api.listSites({ filter: 'all' })
sites = await listSites({ api, options: { maxPages: 1, filter: 'all' } })
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Limit to 1 page of results since the option here is Fetching recently updated sites

Copy link
Contributor

@JGAntunes JGAntunes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@erezrokah erezrokah merged commit 304bf01 into master Feb 17, 2021
@erezrokah erezrokah deleted the fix/paginate_list_sites branch February 17, 2021 16:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug code to address defects in shipped code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

fix: use pagination API when listing sites Connecting site by git remote url not working for private repos
2 participants