Closed
Description
Description of the problem, including code/CLI snippet
$ gitlab -d -o json -g rd project-commit-status create --project-id jgeorgesion%2ftest --commit-id 84944e9030614dfa9b1de5c183aa7916aaaaa6c3 --state running --description "This is a status" --name "build" --ref master --target-url http://ci.example.com/builds/1
Expected Behavior
Status posted to server
Actual Behavior
send: 'POST /api/v4/projects/%(project_id)s/statuses/%(commit_id)s HTTP/1.1\r\nHost: gitlab.example.com\r\nConnection: keep-alive\r\nAccept-Encoding: gzip, deflate\r\nAccept: */*\r\nUser-Agent: python-requests/2.18.4\r\nPRIVATE-TOKEN: blahblahblah\r\nContent-type: application/json\r\nContent-Length: 228\r\n\r\n{"commit_id": "84944e9030614dfa9b1de5c183aa7916aaaaa6c3", "target_url": "http://ci.example.com/builds/1", "name": "build", "state": "running", "project_id": "jgeorgeson%2ftest", "ref": "master", "description": "This is a status"}'
reply: 'HTTP/1.1 400 Bad Request\r\n'
header: Server: nginx
header: Date: Wed, 30 May 2018 22:10:05 GMT
header: Content-Type: text/html
header: Content-Length: 166
header: Connection: close
DEBUG:urllib3.connectionpool:https://gitlab.example.com:443 "POST /api/v4/projects/%(project_id)s/statuses/%(commit_id)s HTTP/1.1" 400 166
Impossible to create object (400: <html>
<head><title>400 Bad Request</title></head>
<body bgcolor="white">
<center><h1>400 Bad Request</h1></center>
<hr><center>nginx</center>
</body>
</html>
)
Specifications
- python-gitlab version: 1.4.0
- python version: 2.7.5 and 3.6.3 on CentOS 7
- API version you are using (v3/v4): v4
- Gitlab server version (or gitlab.com): 10.2.8 and 1.7.4, both EE
Metadata
Metadata
Assignees
Labels
No labels