Title: Trying to list merge requests containing specific approver_ids returns an exception · Issue #1010 · python-gitlab/python-gitlab · GitHub
Open Graph Title: Trying to list merge requests containing specific approver_ids returns an exception · Issue #1010 · python-gitlab/python-gitlab
X Title: Trying to list merge requests containing specific approver_ids returns an exception · Issue #1010 · python-gitlab/python-gitlab
Description: Description of the problem, including code/CLI snippet I am trying to list merge requests which contain a certain approver ID. As per https://docs.gitlab.com/ee/api/merge_requests.html#list-merge-requests this should be doable via: gl.me...
Open Graph Description: Description of the problem, including code/CLI snippet I am trying to list merge requests which contain a certain approver ID. As per https://docs.gitlab.com/ee/api/merge_requests.html#list-merge-r...
X Description: Description of the problem, including code/CLI snippet I am trying to list merge requests which contain a certain approver ID. As per https://docs.gitlab.com/ee/api/merge_requests.html#list-merge-r...
Opengraph URL: https://github.com/python-gitlab/python-gitlab/issues/1010
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Trying to list merge requests containing specific approver_ids returns an exception","articleBody":"## Description of the problem, including code/CLI snippet\r\nI am trying to list merge requests which contain a certain approver ID. As per https://docs.gitlab.com/ee/api/merge_requests.html#list-merge-requests this should be doable via:\r\n```\r\ngl.mergerequests.list(approver_ids=[1])\r\n```\r\nCalling that code raises the following exception (GitLab EE):\r\n```\r\nTraceback (most recent call last):\r\n File \"/venv/lib/python3.7/site-packages/gitlab/exceptions.py\", line 267, in wrapped_f\r\n return f(*args, **kwargs)\r\n File \"/venv/lib/python3.7/site-packages/gitlab/mixins.py\", line 141, in list\r\n obj = self.gitlab.http_list(path, **data)\r\n File \"/venv/lib/python3.7/site-packages/gitlab/__init__.py\", line 648, in http_list\r\n return list(GitlabList(self, url, query_data, get_next=False, **kwargs))\r\n File \"/venv/lib/python3.7/site-packages/gitlab/__init__.py\", line 771, in __init__\r\n self._query(url, query_data, **kwargs)\r\n File \"/venv/lib/python3.7/site-packages/gitlab/__init__.py\", line 776, in _query\r\n result = self._gl.http_request(\"get\", url, query_data=query_data, **kwargs)\r\n File \"/venv/lib/python3.7/site-packages/gitlab/__init__.py\", line 572, in http_request\r\n response_body=result.content,\r\ngitlab.exceptions.GitlabHttpError: 400: approver_ids should be an array, 'None' or 'Any'\r\n```\r\nIn the gitlab server logs I see the following:\r\n```\r\n\"GET /api/v4/merge_requests?approver_ids=1 HTTP/1.1\" 400 60 \"-\" \"python-gitlab/2.0.1\" \"-\"\r\n```\r\n\r\n## Expected Behavior\r\nReturn merge requests for the specified approver_ids.\r\n\r\n## Actual Behavior\r\nRaises an exception.\r\n\r\n## Specifications\r\n\r\n - python-gitlab version: 2.0.1\r\n - API version you are using (v3/v4): v4\r\n - Gitlab server version (or gitlab.com): 12.7.5-ee\r\n","author":{"url":"https://github.com/sim0nx","@type":"Person","name":"sim0nx"},"datePublished":"2020-02-10T09:34:16.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/1010/python-gitlab/issues/1010"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:0891565e-f25d-f348-5edb-643bcd06828a |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A134:209CC7:2DA05EA:3EAF267:6972B7E3 |
| html-safe-nonce | 8fa0df1210fb5878bf2227dcec140769ac1d6af1ccb3f8cdc7c18d95388cf94f |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMTM0OjIwOUNDNzoyREEwNUVBOjNFQUYyNjc6Njk3MkI3RTMiLCJ2aXNpdG9yX2lkIjoiMjI1NzI2MDY1MTYyMjg3MzA1OSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | c53833ba033db5bf87b388857dadd18b84980daa756f7f3155ee98826c008f35 |
| hovercard-subject-tag | issue:562433876 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python-gitlab/python-gitlab/1010/issue_layout |
| twitter:image | https://opengraph.githubassets.com/2d8bc53b01580bd3bc74eb42cd485ff1692ac8b992457f3ae57b72447bc9c4b4/python-gitlab/python-gitlab/issues/1010 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/2d8bc53b01580bd3bc74eb42cd485ff1692ac8b992457f3ae57b72447bc9c4b4/python-gitlab/python-gitlab/issues/1010 |
| og:image:alt | Description of the problem, including code/CLI snippet I am trying to list merge requests which contain a certain approver ID. As per https://docs.gitlab.com/ee/api/merge_requests.html#list-merge-r... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | sim0nx |
| hostname | github.com |
| expected-hostname | github.com |
| None | 51c0d0848f5569c6fa2198e9d69bd5f8f94a83c9fa3659e40728e7732afab130 |
| turbo-cache-control | no-preview |
| go-import | github.com/python-gitlab/python-gitlab git https://github.com/python-gitlab/python-gitlab.git |
| octolytics-dimension-user_id | 28886265 |
| octolytics-dimension-user_login | python-gitlab |
| octolytics-dimension-repository_id | 8077625 |
| octolytics-dimension-repository_nwo | python-gitlab/python-gitlab |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 8077625 |
| octolytics-dimension-repository_network_root_nwo | python-gitlab/python-gitlab |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 10c5e2f2307495b2750073db87e9a5d3356a924f |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width