Update internal/codespaces/api/api.go
Co-authored-by: Jose Garcia <josebalius@github.com>
This commit is contained in:
parent
e793a5961d
commit
4314f734e3
1 changed files with 4 additions and 5 deletions
|
|
@ -228,12 +228,11 @@ func (a *API) ListCodespaces(ctx context.Context) ([]*Codespace, error) {
|
|||
return nil, fmt.Errorf("error unmarshaling response: %w", err)
|
||||
}
|
||||
|
||||
if len(response.Codespaces) > 0 {
|
||||
codespaces = append(codespaces, response.Codespaces...)
|
||||
page++
|
||||
} else {
|
||||
break
|
||||
if len(response.Codespaces) == 0 {
|
||||
break
|
||||
}
|
||||
|
||||
codespaces = append(codespaces, response.Codespaces...)
|
||||
}
|
||||
|
||||
return codespaces, nil
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue