Skip to content
This repository has been archived by the owner on Dec 10, 2024. It is now read-only.

Commit

Permalink
use dedicated type instead of ListOptions
Browse files Browse the repository at this point in the history
  • Loading branch information
Iridias committed Oct 17, 2024
1 parent 5288cf5 commit 0abe526
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion group_members.go
Original file line number Diff line number Diff line change
Expand Up @@ -253,12 +253,18 @@ func (s *GroupsService) ListBillableGroupMembers(gid interface{}, opt *ListBilla
return bgm, resp, nil
}

// ListMembershipsForBillableGroupMemberOptions represents the available ListMembershipsForBillableGroupMember() options.
//
// GitLab API docs:
// https://docs.gitlab.com/ee/api/members.html#list-memberships-for-a-billable-member-of-a-group
type ListMembershipsForBillableGroupMemberOptions = ListOptions

// ListMembershipsForBillableGroupMember Gets a list of memberships for a billable member of a group.
// Lists all projects and groups a user is a member of. Only projects and groups within the group hierarchy are included.
//
// GitLab API docs:
// https://docs.gitlab.com/ee/api/members.html#list-memberships-for-a-billable-member-of-a-group
func (s *GroupsService) ListMembershipsForBillableGroupMember(gid interface{}, user int, opt *ListOptions, options ...RequestOptionFunc) ([]*BillableUserMembership, *Response, error) {
func (s *GroupsService) ListMembershipsForBillableGroupMember(gid interface{}, user int, opt *ListMembershipsForBillableGroupMemberOptions, options ...RequestOptionFunc) ([]*BillableUserMembership, *Response, error) {
group, err := parseID(gid)
if err != nil {
return nil, nil, err
Expand Down
2 changes: 1 addition & 1 deletion group_members_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ func TestListMembershipsForBillableGroupMember(t *testing.T) {
]`)
})

memberships, _, err := client.Groups.ListMembershipsForBillableGroupMember(1, 42, &ListOptions{})
memberships, _, err := client.Groups.ListMembershipsForBillableGroupMember(1, 42, &ListMembershipsForBillableGroupMemberOptions{})
if err != nil {
t.Errorf("Groups.ListMembershipsForBillableGroupMember returned error: %v", err)
}
Expand Down

0 comments on commit 0abe526

Please sign in to comment.