Skip to content

Commit 30ed68d

Browse files
committed
Inline repoReq.Topics
Signed-off-by: Timo Sand <[email protected]>
1 parent c8e8f67 commit 30ed68d

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

github/resource_github_repository.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -997,10 +997,9 @@ func resourceGithubRepositoryUpdate(ctx context.Context, d *schema.ResourceData,
997997
}
998998

999999
if d.HasChange("topics") {
1000-
topics := repoReq.Topics
10011000
// GitHub API docs say that the ReplaceAllTopics endpoint should be used instead of updating the repository with the topics field
10021001
// https://docs.github.com/en/rest/repos/repos?apiVersion=2022-11-28#update-a-repository
1003-
_, _, err := client.Repositories.ReplaceAllTopics(ctx, owner, *repo.Name, topics)
1002+
_, _, err := client.Repositories.ReplaceAllTopics(ctx, owner, repo.GetName(), repoReq.Topics)
10041003
if err != nil {
10051004
return diag.FromErr(err)
10061005
}

0 commit comments

Comments
 (0)