Commit 60beef36 authored by Patrick Rice's avatar Patrick Rice ☀️ Committed by Timo Furrer
Browse files

feat(ListOptions): Update ListOptions to use composition instead of aliasing

BREAKING CHANGE: ListOptions implementation changed from aliasing to composition
Changelog: Improvements
parent 190d5c78
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -64,7 +64,9 @@ type AccessRequest struct {
//
// GitLab API docs:
// https://docs.gitlab.com/api/access_requests/#list-access-requests-for-a-group-or-project
type ListAccessRequestsOptions ListOptions
type ListAccessRequestsOptions struct {
	ListOptions
}

// ListProjectAccessRequests gets a list of access requests
// viewable by the authenticated user.
+3 −1
Original line number Diff line number Diff line
@@ -80,7 +80,9 @@ func (s *ApplicationsService) CreateApplication(opt *CreateApplicationOptions, o

// ListApplicationsOptions represents the available
// ListApplications() options.
type ListApplicationsOptions ListOptions
type ListApplicationsOptions struct {
	ListOptions
}

// ListApplications get a list of administrables applications by the authenticated user
//
+3 −1
Original line number Diff line number Diff line
@@ -92,7 +92,9 @@ const (
//
// GitLab API docs:
// https://docs.gitlab.com/api/emoji_reactions/
type ListAwardEmojiOptions ListOptions
type ListAwardEmojiOptions struct {
	ListOptions
}

// ListMergeRequestAwardEmoji gets a list of all award emoji on the merge request.
//
+4 −2
Original line number Diff line number Diff line
@@ -1428,8 +1428,10 @@ func TestAwardEmojiService_Timeout(t *testing.T) {
	defer cancel()

	opt := &ListAwardEmojiOptions{
		ListOptions: ListOptions{
			Page:    1,
			PerPage: 20,
		},
	}

	aes, resp, err := client.AwardEmoji.ListMergeRequestAwardEmoji(1, 80, opt, WithContext(ctx))
+6 −2
Original line number Diff line number Diff line
@@ -180,7 +180,9 @@ func (s *IssueBoardsService) DeleteIssueBoard(pid any, board int, options ...Req
// ListIssueBoardsOptions represents the available ListIssueBoards() options.
//
// GitLab API docs: https://docs.gitlab.com/api/boards/#list-project-issue-boards
type ListIssueBoardsOptions ListOptions
type ListIssueBoardsOptions struct {
	ListOptions
}

// ListIssueBoards gets a list of all issue boards in a project.
//
@@ -233,7 +235,9 @@ func (s *IssueBoardsService) GetIssueBoard(pid any, board int, options ...Reques
// GetIssueBoardListsOptions represents the available GetIssueBoardLists() options.
//
// GitLab API docs: https://docs.gitlab.com/api/boards/#list-board-lists-in-a-project-issue-board
type GetIssueBoardListsOptions ListOptions
type GetIssueBoardListsOptions struct {
	ListOptions
}

// GetIssueBoardLists gets a list of the issue board's lists. Does not include
// backlog and closed lists.
Loading