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

support ListOptions for ListMembershipsForBillableGroupMember #2043

Merged
merged 2 commits into from
Oct 18, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions group_members.go
Original file line number Diff line number Diff line change
Expand Up @@ -258,14 +258,14 @@ func (s *GroupsService) ListBillableGroupMembers(gid interface{}, opt *ListBilla
//
// 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, options ...RequestOptionFunc) ([]*BillableUserMembership, *Response, error) {
func (s *GroupsService) ListMembershipsForBillableGroupMember(gid interface{}, user int, opt *ListOptions, options ...RequestOptionFunc) ([]*BillableUserMembership, *Response, error) {
Iridias marked this conversation as resolved.
Show resolved Hide resolved
group, err := parseID(gid)
if err != nil {
return nil, nil, err
}
u := fmt.Sprintf("groups/%s/billable_members/%d/memberships", PathEscape(group), user)

req, err := s.client.NewRequest(http.MethodGet, u, nil, options)
req, err := s.client.NewRequest(http.MethodGet, u, opt, options)
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)
memberships, _, err := client.Groups.ListMembershipsForBillableGroupMember(1, 42, &ListOptions{})
if err != nil {
t.Errorf("Groups.ListMembershipsForBillableGroupMember returned error: %v", err)
}
Expand Down