Skip to content

Commit cfce529

Browse files
Bump github.com/xanzy/go-gitlab from 0.50.0 to 0.51.1 (#718)
* Bump github.com/xanzy/go-gitlab from 0.50.0 to 0.50.4 Bumps [github.com/xanzy/go-gitlab](https://github.com/xanzy/go-gitlab) from 0.50.0 to 0.50.4. - [Release notes](https://github.com/xanzy/go-gitlab/releases) - [Changelog](https://github.com/xanzy/go-gitlab/blob/master/releases_test.go) - [Commits](xanzy/go-gitlab@v0.50.0...v0.50.4) --- updated-dependencies: - dependency-name: github.com/xanzy/go-gitlab dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> * add missing arguments for bump * fix * bump to v0.51.0 * bump to 0.51.1 Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
1 parent c016e21 commit cfce529

15 files changed

+29
-22
lines changed

gitlab/data_source_gitlab_group.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,13 +86,13 @@ func dataSourceGitlabGroupRead(d *schema.ResourceData, meta interface{}) error {
8686

8787
if groupIDOk {
8888
// Get group by id
89-
group, _, err = client.Groups.GetGroup(groupIDData.(int))
89+
group, _, err = client.Groups.GetGroup(groupIDData.(int), nil)
9090
if err != nil {
9191
return err
9292
}
9393
} else if fullPathOk {
9494
// Get group by full path
95-
group, _, err = client.Groups.GetGroup(fullPathData.(string))
95+
group, _, err = client.Groups.GetGroup(fullPathData.(string), nil)
9696
if err != nil {
9797
return err
9898
}

gitlab/data_source_gitlab_group_membership.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,13 +98,13 @@ func dataSourceGitlabGroupMembershipRead(d *schema.ResourceData, meta interface{
9898

9999
if groupIDOk {
100100
// Get group by id
101-
group, _, err = client.Groups.GetGroup(groupIDData.(int))
101+
group, _, err = client.Groups.GetGroup(groupIDData.(int), nil)
102102
if err != nil {
103103
return err
104104
}
105105
} else if fullPathOk {
106106
// Get group by full path
107-
group, _, err = client.Groups.GetGroup(fullPathData.(string))
107+
group, _, err = client.Groups.GetGroup(fullPathData.(string), nil)
108108
if err != nil {
109109
return err
110110
}

gitlab/resource_gitlab_branch_protection_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ func testAccCheckGitlabBranchProtectionAttributes(pb *gitlab.ProtectedBranch, wa
355355
}
356356
remainingWantedGroupIDsAllowedToPush := map[int]struct{}{}
357357
for _, v := range want.GroupsAllowedToPush {
358-
group, _, err := conn.Groups.GetGroup(v)
358+
group, _, err := conn.Groups.GetGroup(v, nil)
359359
if err != nil {
360360
return fmt.Errorf("error looking up group by path %v: %v", v, err)
361361
}

gitlab/resource_gitlab_group.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ func resourceGitlabGroupRead(d *schema.ResourceData, meta interface{}) error {
193193
client := meta.(*gitlab.Client)
194194
log.Printf("[DEBUG] read gitlab group %s", d.Id())
195195

196-
group, resp, err := client.Groups.GetGroup(d.Id())
196+
group, resp, err := client.Groups.GetGroup(d.Id(), nil)
197197
if err != nil {
198198
if resp != nil && resp.StatusCode == http.StatusNotFound {
199199
log.Printf("[DEBUG] gitlab group %s not found so removing from state", d.Id())
@@ -320,7 +320,7 @@ func resourceGitlabGroupDelete(d *schema.ResourceData, meta interface{}) error {
320320
Pending: []string{"Deleting"},
321321
Target: []string{"Deleted"},
322322
Refresh: func() (interface{}, string, error) {
323-
out, response, err := client.Groups.GetGroup(d.Id())
323+
out, response, err := client.Groups.GetGroup(d.Id(), nil)
324324
if err != nil {
325325
if response != nil && response.StatusCode == 404 {
326326
return out, "Deleted", nil

gitlab/resource_gitlab_group_label.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ func resourceGitlabGroupLabelImporter(d *schema.ResourceData, meta interface{})
138138
}
139139

140140
d.SetId(parts[1])
141-
group, _, err := client.Groups.GetGroup(parts[0])
141+
group, _, err := client.Groups.GetGroup(parts[0], nil)
142142
if err != nil {
143143
return nil, err
144144
}

gitlab/resource_gitlab_group_label_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ func testAccCheckGitlabGroupLabelDestroy(s *terraform.State) error {
187187
continue
188188
}
189189

190-
group, resp, err := conn.Groups.GetGroup(rs.Primary.ID)
190+
group, resp, err := conn.Groups.GetGroup(rs.Primary.ID, nil)
191191
if err == nil {
192192
if group != nil && fmt.Sprintf("%d", group.ID) == rs.Primary.ID {
193193
if group.MarkedForDeletionOn == nil {

gitlab/resource_gitlab_group_ldap_link_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ func testAccCheckGitlabGroupLdapLinkDestroy(s *terraform.State) error {
122122
continue
123123
}
124124

125-
group, resp, err := conn.Groups.GetGroup(resourceState.Primary.ID)
125+
group, resp, err := conn.Groups.GetGroup(resourceState.Primary.ID, nil)
126126
if err == nil {
127127
if group != nil && fmt.Sprintf("%d", group.ID) == resourceState.Primary.ID {
128128
if group.MarkedForDeletionOn == nil {

gitlab/resource_gitlab_group_share_group.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ func resourceGitlabGroupShareGroupRead(d *schema.ResourceData, meta interface{})
8787
}
8888

8989
// Query main group
90-
group, resp, err := client.Groups.GetGroup(groupId)
90+
group, resp, err := client.Groups.GetGroup(groupId, nil)
9191
if err != nil {
9292
if resp != nil && resp.StatusCode == http.StatusNotFound {
9393
log.Printf("[DEBUG] gitlab group %s not found so removing from state", groupId)

gitlab/resource_gitlab_group_share_group_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ func testAccCheckGitlabGroupSharedWithGroup(
8181
return func(_ *terraform.State) error {
8282
client := testAccProvider.Meta().(*gitlab.Client)
8383

84-
mainGroup, _, err := client.Groups.GetGroup(fmt.Sprintf("%s_main", groupName))
84+
mainGroup, _, err := client.Groups.GetGroup(fmt.Sprintf("%s_main", groupName), nil)
8585
if err != nil {
8686
return err
8787
}
@@ -115,7 +115,7 @@ func testAccCheckGitlabGroupIsNotShared(groupName string) resource.TestCheckFunc
115115
return func(_ *terraform.State) error {
116116
client := testAccProvider.Meta().(*gitlab.Client)
117117

118-
mainGroup, _, err := client.Groups.GetGroup(fmt.Sprintf("%s_main", groupName))
118+
mainGroup, _, err := client.Groups.GetGroup(fmt.Sprintf("%s_main", groupName), nil)
119119
if err != nil {
120120
return err
121121
}

gitlab/resource_gitlab_group_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ func testAccCheckGitlabGroupDisappears(group *gitlab.Group) resource.TestCheckFu
225225
// Fixes groups API async deletion issue
226226
// https://github.com/gitlabhq/terraform-provider-gitlab/issues/319
227227
for start := time.Now(); time.Since(start) < 15*time.Second; {
228-
g, resp, err := conn.Groups.GetGroup(group.ID)
228+
g, resp, err := conn.Groups.GetGroup(group.ID, nil)
229229
if resp != nil && resp.StatusCode == http.StatusNotFound {
230230
return nil
231231
}
@@ -253,7 +253,7 @@ func testAccCheckGitlabGroupExists(n string, group *gitlab.Group) resource.TestC
253253
}
254254
conn := testAccProvider.Meta().(*gitlab.Client)
255255

256-
gotGroup, _, err := conn.Groups.GetGroup(groupID)
256+
gotGroup, _, err := conn.Groups.GetGroup(groupID, nil)
257257
if err != nil {
258258
return err
259259
}
@@ -360,7 +360,7 @@ func testAccCheckGitlabGroupDestroy(s *terraform.State) error {
360360
continue
361361
}
362362

363-
group, resp, err := conn.Groups.GetGroup(rs.Primary.ID)
363+
group, resp, err := conn.Groups.GetGroup(rs.Primary.ID, nil)
364364
if err == nil {
365365
if group != nil && fmt.Sprintf("%d", group.ID) == rs.Primary.ID {
366366
if group.MarkedForDeletionOn == nil {

0 commit comments

Comments
 (0)