Closed
Description
Description of the problem, including code/CLI snippet
I'm using the code snippet here to update reviewers on a merge request, but the "Reviewers" field isn't updating despite gitlab returning "200 OK" after the POST request is sent.
Expected Behavior
A valid POST request with the reviewer_ids
field set to an integer array updates the reviewers on the merge request. E.g.
mr.reviewer_ids = [1001, 1002, 1003]
mr.save()
should return
{'id': ...
'reviewers': [{'id': 1001, 'username': ...}, {'id': 1002, 'username': ...}, {'id': 1003, 'username': ...}],
...
}
Actual Behavior
Turning on http debugging for the above python, I can see the POST request get sent and the gitlab server responds with a 200 OK:
send: b'PUT /api/v4/projects/31242/merge_requests/18 HTTP/1.1\r\nHost: REDACTED\r\nUser-Agent: python-gitlab/3.15.0\r\nAccept-Encoding: gzip, deflate\r\nAccept: */*\r\nConnection: keep-alive\r\nPRIVATE-TOKEN: REDACTED\r\nContent-type: application/json\r\nContent-Length: 36\r\n\r\n'
send: b'{"reviewer_ids": [1001, 1002, 1003]}'
reply: 'HTTP/1.1 200 OK\r\n'
And dumping the updated fields returned shows no reviewers:
{'id': ...
'reviewers': [],
...
}
Specifications
- python-gitlab version: 3.15.0
- API version you are using (v3/v4): v4
- Gitlab server version (or gitlab.com): GitLab Enterprise Edition 15.7.5-ee
Metadata
Metadata
Assignees
Labels
No labels