Skip to content

Commit 165f848

Browse files
fix: Have participants() method use http_list()
Previously it was using `http_get()` but the `participants` API returns a list of participants. Also by using this then we will warn if only a subset of the participants are returned. Closes: #2913
1 parent 51d8f88 commit 165f848

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

gitlab/mixins.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -911,7 +911,9 @@ class ParticipantsMixin(_RestObjectBase):
911911

912912
@cli.register_custom_action(cls_names=("ProjectMergeRequest", "ProjectIssue"))
913913
@exc.on_http_error(exc.GitlabListError)
914-
def participants(self, **kwargs: Any) -> Dict[str, Any]:
914+
def participants(
915+
self, **kwargs: Any
916+
) -> Union[gitlab.client.GitlabList, List[Dict[str, Any]]]:
915917
"""List the participants.
916918
917919
Args:
@@ -929,7 +931,7 @@ def participants(self, **kwargs: Any) -> Dict[str, Any]:
929931
"""
930932

931933
path = f"{self.manager.path}/{self.encoded_id}/participants"
932-
result = self.manager.gitlab.http_get(path, **kwargs)
934+
result = self.manager.gitlab.http_list(path, **kwargs)
933935
if TYPE_CHECKING:
934936
assert not isinstance(result, requests.Response)
935937
return result

0 commit comments

Comments
 (0)