Skip to content

Commit 4feb656

Browse files
committed
Upgrade to go-gitlab v0.55.0
1 parent 81d94ab commit 4feb656

File tree

6 files changed

+8
-7
lines changed

6 files changed

+8
-7
lines changed

go.mod

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,12 @@ go 1.16
55
require (
66
github.com/apparentlymart/go-cidr v1.1.0 // indirect
77
github.com/aws/aws-sdk-go v1.37.0 // indirect
8+
github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320
89
github.com/hashicorp/go-retryablehttp v0.7.0
910
github.com/hashicorp/hcl/v2 v2.8.2 // indirect
1011
github.com/hashicorp/terraform-plugin-sdk/v2 v2.10.1
1112
github.com/mitchellh/hashstructure v1.1.0
1213
github.com/onsi/gomega v1.18.1
13-
github.com/xanzy/go-gitlab v0.54.4
14+
github.com/xanzy/go-gitlab v0.55.0
1415
google.golang.org/api v0.34.0 // indirect
1516
)

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -344,8 +344,8 @@ github.com/vmihailenco/msgpack v4.0.4+incompatible h1:dSLoQfGFAo3F6OoNhwUmLwVgaU
344344
github.com/vmihailenco/msgpack v4.0.4+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk=
345345
github.com/vmihailenco/msgpack/v4 v4.3.12/go.mod h1:gborTTJjAo/GWTqqRjrLCn9pgNN+NXzzngzBKDPIqw4=
346346
github.com/vmihailenco/tagparser v0.1.1/go.mod h1:OeAg3pn3UbLjkWt+rN9oFYB6u/cQgqMEUPoW2WPyhdI=
347-
github.com/xanzy/go-gitlab v0.54.4 h1:3CFEdQ9O+bFx3BsyuOK0gqgLPwnT2rwnPOjudV07wTw=
348-
github.com/xanzy/go-gitlab v0.54.4/go.mod h1:F0QEXwmqiBUxCgJm8fE9S+1veX4XC9Z4cfaAbqwk4YM=
347+
github.com/xanzy/go-gitlab v0.55.0 h1:klg5EgPYtsF6QlnVFpOpv/FmhqQxCUUG7zLJIL1NKz8=
348+
github.com/xanzy/go-gitlab v0.55.0/go.mod h1:F0QEXwmqiBUxCgJm8fE9S+1veX4XC9Z4cfaAbqwk4YM=
349349
github.com/xanzy/ssh-agent v0.3.0 h1:wUMzuKtKilRgBAD1sUb8gOwwRr2FGoBVumcjoOACClI=
350350
github.com/xanzy/ssh-agent v0.3.0/go.mod h1:3s9xbODqPuuhK9JV1R321M/FlMZSBvE5aY6eAcqrDh0=
351351
github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=

internal/provider/resource_gitlab_group_label.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ func resourceGitlabGroupLabelRead(ctx context.Context, d *schema.ResourceData, m
8585
page := 1
8686
labelsLen := 0
8787
for page == 1 || labelsLen != 0 {
88-
labels, _, err := client.GroupLabels.ListGroupLabels(group, &gitlab.ListGroupLabelsOptions{Page: page}, gitlab.WithContext(ctx))
88+
labels, _, err := client.GroupLabels.ListGroupLabels(group, &gitlab.ListGroupLabelsOptions{ListOptions: gitlab.ListOptions{Page: page}}, gitlab.WithContext(ctx))
8989
if err != nil {
9090
return diag.FromErr(err)
9191
}

internal/provider/resource_gitlab_group_label_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ func testAccCheckGitlabGroupLabelExists(n string, label *gitlab.GroupLabel) reso
140140
return fmt.Errorf("No group ID is set")
141141
}
142142

143-
labels, _, err := testGitlabClient.GroupLabels.ListGroupLabels(groupName, &gitlab.ListGroupLabelsOptions{PerPage: 1000})
143+
labels, _, err := testGitlabClient.GroupLabels.ListGroupLabels(groupName, &gitlab.ListGroupLabelsOptions{ListOptions: gitlab.ListOptions{PerPage: 1000}})
144144
if err != nil {
145145
return err
146146
}

internal/provider/resource_gitlab_project_variable.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ func resourceGitlabProjectVariableDelete(ctx context.Context, d *schema.Resource
203203
// but it will be ignored in prior versions, causing nondeterministic destroy behavior when
204204
// destroying or updating scoped variables.
205205
// ref: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/39209
206-
_, err := client.ProjectVariables.RemoveVariable(project, key, withEnvironmentScopeFilter(ctx, environmentScope))
206+
_, err := client.ProjectVariables.RemoveVariable(project, key, nil, withEnvironmentScopeFilter(ctx, environmentScope))
207207
return augmentProjectVariableClientError(d, err)
208208
}
209209

internal/provider/resource_gitlab_project_variable_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ resource "gitlab_project_variable" "foo" {
106106
// Check that the variable is recreated if deleted out-of-band.
107107
{
108108
PreConfig: func() {
109-
if _, err := testGitlabClient.ProjectVariables.RemoveVariable(ctx.project.ID, "my_key"); err != nil {
109+
if _, err := testGitlabClient.ProjectVariables.RemoveVariable(ctx.project.ID, "my_key", nil); err != nil {
110110
t.Fatalf("failed to remove variable: %v", err)
111111
}
112112
},

0 commit comments

Comments
 (0)