Skip to content

Should the participants method use http_list? #2913

Closed
@JohnVillalovos

Description

@JohnVillalovos

Currently the participants() method is using http_get().

Should it use http_list()? I'm thinking yes. @nejch What do you think?

https://docs.gitlab.com/ee/api/merge_requests.html#get-single-merge-request-participants

def participants(self, **kwargs: Any) -> Dict[str, Any]:
"""List the participants.
Args:
all: If True, return all the items, without pagination
per_page: Number of items to retrieve per request
page: ID of the page to return (starts with page 1)
**kwargs: Extra options to send to the server (e.g. sudo)
Raises:
GitlabAuthenticationError: If authentication is not correct
GitlabListError: If the list could not be retrieved
Returns:
The list of participants
"""
path = f"{self.manager.path}/{self.encoded_id}/participants"
result = self.manager.gitlab.http_get(path, **kwargs)
if TYPE_CHECKING:
assert not isinstance(result, requests.Response)
return result

Possibly related is #2912

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions