Closed
Description
Description of the problem, including code/CLI snippet
There might be a possible regression of #1010 with the latest version. The issue is exactly the same:
group = gl.groups.get(id=475)
group_mrs = group.mergerequests.list(
all=True,
state="opened",
author_id=423,
approver_ids=[423],
)
[21:49:48] DEBUG Starting new HTTPS connection (1): *redacted*:443 connectionpool.py:971
DEBUG https://*redacted*:443 "GET /api/v4/user HTTP/1.1" 200 None connectionpool.py:452
[21:49:49] DEBUG https://*redacted*:443 "GET /api/v4/groups/475 HTTP/1.1" 200 None connectionpool.py:452
DEBUG https://*redacted*:443 "GET connectionpool.py:452
/api/v4/groups/475/merge_requests?state=opened&author_id=423&approver_ids=423
HTTP/1.1" 400 60
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/gitlab/exceptions.py", line 304, in wrapped_f
return f(*args, **kwargs)
File "/usr/local/lib/python3.9/site-packages/gitlab/mixins.py", line 242, in list
obj = self.gitlab.http_list(path, **data)
File "/usr/local/lib/python3.9/site-packages/gitlab/client.py", line 718, in http_list
return list(GitlabList(self, url, query_data, **kwargs))
File "/usr/local/lib/python3.9/site-packages/gitlab/client.py", line 881, in __init__
self._query(url, query_data, **self._kwargs)
File "/usr/local/lib/python3.9/site-packages/gitlab/client.py", line 891, in _query
result = self._gl.http_request("get", url, query_data=query_data, **kwargs)
File "/usr/local/lib/python3.9/site-packages/gitlab/client.py", line 628, in http_request
raise gitlab.exceptions.GitlabHttpError(
gitlab.exceptions.GitlabHttpError: 400: approver_ids should be an array, 'None' or 'Any'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "*redacted*.py", line 30, in <module>
group_mrs = group.mergerequests.list(
File "/usr/local/lib/python3.9/site-packages/gitlab/exceptions.py", line 306, in wrapped_f
raise error(e.error_message, e.response_code, e.response_body) from e
gitlab.exceptions.GitlabListError: 400: approver_ids should be an array, 'None' or 'Any'
Expected Behavior
Return merge requests for the specified approver_ids
.
Actual Behavior
Raises an exception.
Specifications
- python-gitlab version: 2.10.1
- API version you are using (v3/v4): v4
- Gitlab server version (or gitlab.com): 14.2.4-ee
Metadata
Metadata
Assignees
Labels
No labels