From e0f89c335c21ec684ffbd4d4a5f1305ddd250cc2 Mon Sep 17 00:00:00 2001 From: Nathan Anderson <50156123+n47h4n12@users.noreply.github.com> Date: Fri, 3 May 2024 11:10:11 -0600 Subject: [PATCH] changed logic on repositories_detailed (#2248) Co-authored-by: Nathan --- github/data_source_github_team.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/github/data_source_github_team.go b/github/data_source_github_team.go index d33ba62b7e..c9464e8f5b 100644 --- a/github/data_source_github_team.go +++ b/github/data_source_github_team.go @@ -168,14 +168,14 @@ func dataSourceGithubTeamRead(d *schema.ResourceData, meta interface{}) error { } } + repositories_detailed = make([]interface{}, 0, resultsPerPage) //removed this from the loop + for { repository, resp, err := client.Teams.ListTeamReposByID(ctx, orgId, team.GetID(), &options.ListOptions) if err != nil { return err } - repositories_detailed = make([]interface{}, 0, len(repository)) - for _, v := range repository { repositories = append(repositories, v.GetName()) repositories_detailed = append(repositories_detailed, map[string]interface{}{