diff --git a/github/data_source_github_repository_environments.go b/github/data_source_github_repository_environments.go index 13e5dd8465..1a58857a08 100644 --- a/github/data_source_github_repository_environments.go +++ b/github/data_source_github_repository_environments.go @@ -43,7 +43,9 @@ func dataSourceGithubRepositoryEnvironmentsRead(d *schema.ResourceData, meta int results := make([]map[string]interface{}, 0) - var listOptions *github.EnvironmentListOptions + var listOptions = &github.EnvironmentListOptions{ + ListOptions: github.ListOptions{}, + } for { environments, resp, err := client.Repositories.ListEnvironments(context.Background(), orgName, repoName, listOptions) if err != nil {